Make a Single Page appear in header nav
Permalink
Hi,
I wanna show the 'Profile' single page in the navigation bar (using autonav) but I dont wanna put it as an 'External Link'. How can I do it?
Thank you a lot,
Martí.
I wanna show the 'Profile' single page in the navigation bar (using autonav) but I dont wanna put it as an 'External Link'. How can I do it?
Thank you a lot,
Martí.
Yes the Members Page does appear if I enable Public Profiles, but the Profile page hasn't got an option in the dashboard.
The Members page is system level. Check the 'Show System Pages' check box and it will appear.
I had to modify the autonav template but It works well now.
Thanks
Thanks
Hey,
I have the same problen. How did you modify it?
I have the same problen. How did you modify it?
Could you please share your solution marticps?
I attach the template. HannesLenk, I didn't noticed your message, I am sorry.
<?php defined('C5_EXECUTE') or die("Access Denied."); $controller->displaySystemPages = true; $aBlocks = $controller->generateNav(); $c = Page::getCurrentPage(); echo("<ul>"); $nh = Loader::helper('navigation'); $isFirst = true; foreach($aBlocks as $ni) { $_c = $ni->getCollectionObject(); if (!$_c->getCollectionAttributeValue('exclude_nav')) { $target = $ni->getTarget(); if ($target != '') { $target = 'target="' . $target . '"'; }
Viewing 15 lines of 44 lines. View entire code block.
Thanks, this line did the trick:
$controller->displaySystemPages = true;
$controller->displaySystemPages = true;
This thread is a little old but I just encountered this same issue. How can I get the register.php single page to show up in my autonav display? I didn't recognize the template that is mentioned here but ith a lot of thought of what was going on here, I figured it out.
When hard coding the autonav into your own view template, add this line; $controller->displaySystemPages = true; to your autonav section.
When hard coding the autonav into your own view template, add this line; $controller->displaySystemPages = true; to your autonav section.
Example: <?php $nav = BlockType::getByHandle('autonav'); --> $nav->controller->displaySystemPages = true; $nav->controller->orderBy = 'display_asc'; $nav->controller->displayPages = 'top'; $nav->controller->displaySubPages = 'none'; $nav->render('templates/header_menu'); ?>
Does it not show up when you're logged in?