Forum

Thread tagged as: Problem, Discussion, Docs

Navigation in folder with underscore

In Perch, I created a folder to store minutes of meetings: minutes_monthly (note the underscore) and on the minutes_monthly/index.php added navigation to show the subfolders and subpages:

            <?php 
            perch_pages_navigation(array(
                'from-path' => '/minutes_monthly',
            'levels' => 2
            ));
            ?>

This only returns the default navigation for the site, not the focused navigation I seek.

On the perch_pages_navigation() page in the docs I learn:

Use 'from-path'=>'*' to put the navigation in the context of the current page

This gives me the result I want:

            <?php 
            perch_pages_navigation(array(
                'from-path' => '*',
            'levels' => 2
            ));
            ?>

Perhaps I shouldn't use an underscore in my file names, but if you find yourself in the same situation, this tip may help.

John Rose

John Rose 6 points

  • 3 years ago