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

Forum

Thread tagged as: Problem, Configuration

Only displaying breadcrumbs one level deep.

I'm having trouble displaying breadcrumbs more than one level deep. I have a page 'Video Gallery' which is a sub page of Media Gallery in the admin but no matter how i adjust the levels, it only displays Home > Media Gallery.

This is the current PHP I'm trying if that helps...

<?php 
        perch_pages_breadcrumbs(array(
            'template'=>'breadcrumbs_custom.html',
            'levels'    => 3
        )); 
    ?>

And this is my template...


<perch:before> <ul class="breadcrumbs inline"> <li><a href="/">Home</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> &gt; </perch:if> </li> <perch:after> </ul> </perch:after>

I've also tried not specifying levels and setting levels to 0 but still no love. :(

Jana Hoffmann

Jana Hoffmann 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What do you get with no options?

<?php
    perch_pages_breadcrumbs();
?>

The same, just the parent page name is displayed.

It is a page I created inside the gallery folder that was created for adding the gallery addon. So for example I have

gallery/index.php

gallery/video-gallery.php <- this is the page I'm trying to add a breadcrumb to.

gallery/album.php

if it's not possible or really difficult I can just hardcode it I suppose. I just thought maybe I am doing something goofy.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you added that page to your navigation structure?

I have created the page as a sub page in the admin, setting it to 'page already exists' if that's what you mean. I've been able to add and edit region content on the page no problems

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, that's what I meant. Is it showing up correctly in normal navigation? I'm a bit puzzled.

I'm a bit worried if you're puzzled! :p

I've only got navigation 1 level deep through the rest of the site but I added a test nav using the following to test and the page doesn't show up no.

<?php perch_pages_navigation(array( 'levels' => 5, )); ?>

Drew McLellan

Drew McLellan 2638 points
Perch Support

If your navigation is only 1 level - what breadcrumb are you looking to display? Can you give an example?

Sorry, maybe I'm numbering my levels wrong :p What I am looking for is

Home > Media Galleries > Video Gallery

but all I am getting is

Home > Media Galleries

even though that isn't the page I'm on. Media Galleries is currently the only page with children.

Drew McLellan

Drew McLellan 2638 points
Perch Support

And that's when your on the Video Gallery page?

yup. The site is now on my staging area if that helps at all...