Forum

Thread tagged as: Problem

Editor can create pages but they do not show in menu

I have an editor role that set up. The editor can create pages, the pages are entered into the system and can be populated with content by the editor.

However they do not show up in the menu at any point.

The same process is repeated with the master log in and the pages appear fine?

Tony Astley

Tony Astley 0 points

  • 4 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

We need to see your Diagnostics Report and also any relevant code (such as that which is generating the navigation).

Sure..

<?php perch_pages_navigation(array(
                    'levels'=>1,
                    'navgroup'=> 'portfolio',
                    'template' => array('sub_menu_item.html'),
                    'hide-extensions'      => true,
                )); ?>

Diagnostics report HEALTH CHECK

Perch is up to date PHP 7.0.6 is up to date MySQL 5.6.32-78.0 is up to date Image processing available SUMMARY INFORMATION

Perch: 2.8.34, PHP: 7.0.6, MySQL: 5.5.53, with PDO Server OS: Linux, cgi-fcgi Installed apps: content (2.8.34), assets (2.8.34), categories (2.8.34) App runtimes: <?php $apps_list = array( 'content', 'categories', ); PERCH_LOGINPATH: /perch PERCH_PATH: //html/perch PERCH_CORE: //html/perch/core PERCH_RESFILEPATH: //html/perch/resources Image manipulation: GD PHP limits: Max upload 20M, Max POST 24M, Memory: 120M, Total max file upload: 20M F1: 6a33f95eca3667f9e0c39bf5ca2980fe Resource folder writeable: Yes HTTP_HOST: preview.northlightphotography.co.uk DOCUMENT_ROOT: //html REQUEST_URI: /perch/core/settings/diagnostics/ SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

Drew McLellan

Drew McLellan 2638 points
Perch Support

Are you adding the pages to the 'portfolio' navigation group? That's the group you're displaying.

Yep, works perfect if I'm logged is as the main admin. Just not as editor.

Small development. It turns out if I create the page then re-order it in the navigation group it appears?!

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, great.

No, I need the page to show up in the menu straight away. Not require the editor to go into the nav group afterwards and re-order.

Drew McLellan

Drew McLellan 2638 points
Perch Support

How are you setting where in the navgroup the page should appear if you don't use the reorder page?

The page is added to the nav group as it is created (the master page automatically specifies the nav group). If you then go to the nav group admin panel, you can see the page at the top of the list.

However until you re-order it and save the order it does not appear in the menu.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Nav groups are designed for a specific case where you want to curate a set of navigation that is distinct from the normal site structure. A good example would be links in a site footer.

If you want to show just part of the navigation tree, you don't need (or really want) a nav group for that.

Yes I understand what nav groups are, but I would still have the problem if the user wanted to put something in the footer.

The reason I am using nav groups here as the pages need to sit under the main structure in a drop down, but the parent page is like a placeholder, in this case the client does not want a portfolio 'page' but the navigation shows all of the portfolio pages using a nav group.

Is there a different way to approach this to achieve the same effect?

Drew McLellan

Drew McLellan 2638 points
Perch Support

You could add a page attribute for the portfolio page to indicate it shouldn't be a link. You can then test for this when outputting the link in your navigation template.

This would enable you to maintain the correct page structure, and to reinstate the link easily in the future when the design changes.

Thanks Drew, I've worked around the bug using that method.