Breadcrumbs not working in sub-directories

  • This is the first time I have had this issue, but the perch_pages_breadcrumbs() function isn't working in sub-directories. I'm presently applying it to /blog/index.php and I set up a test/index.php to see if it was any sub-directory(it is) to no avail. Works fine on all pages in the root directory.

    1. <?php
    2. perch_pages_breadcrumbs(array(
    3. 'hide-extensions' => true,
    4. 'hide-default-doc' => false,
    5. 'template' => 'breadcrumbs.html',
    6. 'skip-template' => false
    7. ));
    8. ?>

    I'm using debug on the page, but the function isn't even being called, neither the template listed nor any links on my page. This is strange. How can it be right and wrong at the same time.


  • So, this was figured out.

    I hadn't realized that I had been adding regions to blog pages up to this point. I've been adding Regions so long, that I forgot when you didn't have one, it doesn't matter what other items are pulled in from the CMS, a region is still required for navigation.

    Problem solved. :S

  • drewm

    Approved the thread.
  • a region is still required for navigation.

    It's not required. What you need is a page that is registered with Perch. If a page is not registered with Perch, some of the page functions lose meaning in this context.

    If Perch encounters a perch_content() call, it automatically adds the page to the pages list on the control panel for you. However, you can add pages directly from the control panel yourself by clicking on the "+ Add page" button.