Forum

Thread tagged as: Problem

Navigation only showing one level from current page

I'm trying to show all sub-pages and their sub-pages within a navigation from a given page.

The hierarchy is as follows:

Portfolio

Portfolio Sections

Portfolio Items

I'm trying to show a 2 tier menu on the portfolio page (sections then items). On the portfolio page I have the following code:

<?php perch_pages_navigation(array(
    'levels'=>2,
    'template' => array('portfolio_sections.html','portfolio_items.html'),
    'from-path'  => '*',
    'from-level' => 1,
    'hide-extensions' => true,
)); ?>

However I'm only getting the first level returned using the 'portfolio_sections.html' the pages that sit under these sections are not being returned by the menu.

Tony Astley

Tony Astley 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What's the purpose of from-path here?

I'd followed an example from your website. I always thought that meant show sub pages for current page being viewed.

Any ideas?

Drew McLellan

Drew McLellan 2638 points
Perch Support

I would start without any options and slowly build them up until you reduce the navigation to the set you want.