Forum

Thread tagged as: Question, Problem, Discussion

Navigation to a file uploaded within perch

What's the best way to output a link to a file uploaded from within Perch by using perch_pages_navigation? I currently have a solution that works but I feel like there might be a better way to go about it. At the minute I call perch_pages_navigation with a template containing this:

<perch:if id="pageNavText" match="contains" value="prospectus">
    <a href='<perch:pages id="prospectus" type="file" bucket="prospectuses" label="Prospectus File" />'<perch:pages id="pageNavText" /></a>
  <perch:else />
 *output other links as normal here*
</perch:if>

...which works fine, but requires a redundant page (prospectus.php) that has no content on it (and as such can be deleted easily) and files must be uploaded through the "Page Details" tab rather than the usual Regions.

If anyone has any other solutions I'd love to hear them.

Cheers

Alan Longstaff

Alan Longstaff 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

No great solution immediately springs to mind, but I'll have a think about it.

Alright, that's great thanks. :)