Forum

Thread tagged as: Question

List page title in detail template

Hi

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

  • 7 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 https://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" />