Forum

Thread tagged as: Question

Detail page in Breadcrumbs

How can I get a "Detail" page to show up in the Breadcrumbs?

I know it's not a physical page but is there a way I can edit the Breadcrumb template to show the title of detail pages?

James Tedder

James Tedder 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, you should be able to pass the title into the template. If you show us what you're doing we can try to help. Otherwise all we can do is make guesses.

I have a 2 page List/Detail setup for my Projects the URL is: mywebsite.co.uk/projects/project.php?s=MyProjectTitle

The Current Breadcrumb Shows: Home > Projects > project I would like it to say: Home > Projects > Project Title

The Projects are also tagged with Categories. Clicking these Categories takes you to: mywebsite.co.uk/products/category.php?cat=product/MyCategroyTitle/

The Current Breadcrumb Shows: Home > Products > category I would like it to say: Home > Projects > Product Title

This is my current Breadcrumb template

<perch:before>
<ul class="breadcrumbs">
<li class="home"><a href="/"><i class="fa fa-home" aria-hidden="true"></i></a></li>
</perch:before>
    <li>
        <perch:if exists="perch_item_last">
            <perch:pages id="pageNavText" />
        <perch:else />
            <a href="<perch:pages id="pagePath" />"><perch:pages id="pageNavText" /></a>
        </perch:if>
    </li>
<perch:after>
</ul>
</perch:after>

Do you need to see any other code?

Drew McLellan

Drew McLellan 2638 points
Perch Support

If it's always "Home > Projects > Project Title" isn't the only dynamic part the product title? You don't need breadcrumb functions for that.

I know this is not a long breadcrumb but other pages on the website go deeper and I want breadcrumbs on all pages for consistency

Drew McLellan

Drew McLellan 2638 points
Perch Support

You don't need to do the same on every page. You can get the same output through different technical means.