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

List page title in detail template


I'm using a list and detail page on a site. The layout for the list page is different to the detail page. I wanted to add the main title of the list page into the detail template but don't know how to add this in. I could be missing something really straightforward but just can't find how to do this.

In the code below I am wanting the title of the list page i.e. "Products" to be added between the a tag. I've tried using various id tags but these output numbers, ideally I would like the navigation text output here.

<div class="page_title_surround"> <h2><span><a href="?s=<perch:content id="slug" type="slug" />"><perch:content id="perch_item_zero_index" type="hidden" output="text" /></a></span></h2> <ul> <li>//</li> <li><perch:content id="title" type="text" label="Product title" required="true" title="true" /></li> </ul> </div>

Thanks for any help.

Peter Meenagh

Peter Meenagh 0 points

  • 6 years ago

Sorry just to update this. The slug I've inserted in the template breaks the page so I'm not looking at another method.

Basically what I'm wanting is breadcrumb navigation for the Detail page. I found this post http://support.grabaperch.com/index.php?pg=forums.posts&id=5783 but wasn't sure how to implement this.

Drew McLellan

Drew McLellan 2638 points
Perch Support

How about:

PerchSystem::set_var('page_title', perch_pages_navigation_text(true));

and in your template

<perch:content id="page_title" type="text" />