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í.

marticps
 
CygnetMidwest replied on at Permalink Reply
CygnetMidwest
If you're using the built in auto-nav template, I believe it is set to show the Member page. But, you have to be logged in to see it I think.

Does it not show up when you're logged in?
marticps replied on at Permalink Reply
marticps
Yes the Members Page does appear if I enable Public Profiles, but the Profile page hasn't got an option in the dashboard.
CygnetMidwest replied on at Permalink Best Answer Reply
CygnetMidwest
The Members page is system level. Check the 'Show System Pages' check box and it will appear.
marticps replied on at Permalink Reply
marticps
I had to modify the autonav template but It works well now.
Thanks
HannesLenk replied on at Permalink Reply
Hey,

I have the same problen. How did you modify it?
A3020 replied on at Permalink Reply
A3020
Could you please share your solution marticps?
marticps replied on at Permalink Reply
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 . '"';
         }
A3020 replied on at Permalink Reply
A3020
Thanks, this line did the trick:
$controller->displaySystemPages = true;
ThomasJ replied on at Permalink Reply
ThomasJ
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.
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');
?>