Thread tagged as: Question

Can't seem to get from-path to work in perch_pages_navigation


I must be having a blonde moment but for the life of me I cannot get from-path to work when using perch_pages_navigation(). Here's my code...

                            'from-path' => '/varieties',
                            'hide-extensions' => true,

and all it outputs is the root level menu. If i change 'levels' => 2 I do get the root menu plus the /varieties menu too. So Perch knows it's there.

I've doubled and doubled checked and can't see why it's not showing me just the /varieties menu.

Many thanks for any help.

Perch: 3.0.10, PHP: 7.0.22, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (3.0.10), assets (3.0.10), categories (3.0.10), perch_blog (5.6.1), perch_forms (1.9), chirp_seo (1.1)
App runtimes: <?php $apps_list = [ 'perch_blog', 'perch_forms', 'chirp_seo' ];
PERCH_PATH: /home/plant/U0MA6EL3/htdocs-asparagus/cms
PERCH_CORE: /home/plant/U0MA6EL3/htdocs-asparagus/cms/core
PERCH_RESFILEPATH: /home/plant/U0MA6EL3/htdocs-asparagus/cms/resources
Image manipulation: GD Imagick
PHP limits: Max upload 128M, Max POST 128M, Memory: 256M, Total max file upload: 128M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
DOCUMENT_ROOT: /home/plant/U0MA6EL3/htdocs-asparagus/
REQUEST_URI: /cms/core/settings/diagnostics/
SCRIPT_NAME: /cms/core/settings/diagnostics/index.php
Glen Piggott

Glen Piggott 0 points

  • 7 months ago

Hello Glen,

Is /varieties a sub-page?

If it is a sub-page, you probably need to use 'from-path' => '/parent-page/varieties'.

Hi Hussien

Many thanks for your help.

Unfortunately not, /varieties is a root directory


While I don't think you normally need to do this, but have you tried using 'from-level' => 2?

'from-path' => '/varieties',
'from-level' => 2,
'hide-extensions' => true,

Hi Hussein

Thanks for your help.

Unfortunately, it's still displaying the root level menu.



I had moved and renamed the page - so had a look in the database and the pageSortPath had not updated.

Manually amended the database and hey presto!