We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum


Thread tagged as: Question

Ignore current in navigation

Is it possible to ignore the current page using an option in the perch_pages_navigation() function?

I've got a section with a few pages in it and I'd like to list the siblings only as this nav will appear at the bottom of the page saying something like "You've read that, now check out the other great pages in this section of the website".


Thanks for keeping me right :)

Martin Underhill

Martin Underhill 5 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You can test for current_page in the template.


Ah cool, so I'd just pass in a new template as an option outputting everything but the current page with that conditional. Cheers Drew :)

These opts:


plus this template:

  <perch:if exists="current_page"><perch:else />
      <a href="<perch:pages id="pagePath" />"><perch:pages id="pageNavText" /></a>

do the trick