How can I remove page from main navigation?

Permalink
How can I remove a page from main navigation? I want to keep the page, but just move it off the main navigation at the top.

I've searched for 20 minutes and clicked every button I can think of and have not been able to figure this out. Could someone provide me some guidance?

View Replies:
codingpenguins replied on at Permalink Reply
Go to the dashboard. Click on Sitemap. Click on the name of the page you do not want to display in the main nav. A pop up will appear and click Properties. Then click on the Custom Attributes tab. Then scoll to the bottom and click on the "Exclude from Nav" then click save. And your done.
atconcrete5 replied on at Permalink Reply
Thank you! I didn't see that, but now I do.
Adreco replied on at Permalink Reply
Adreco
codingpenguins has it right if you want it hidden. If you want it moved beneath another page instead, just drag and drop from the sitemap.
kstansbury replied on at Permalink Reply 1 Attachment
kstansbury
I did this on one of my pages but it still shows in the navigation, I have deleted the page recreated it, clear all browsers cache, and yet it still shows up. Any thoughts??

TY Kevin
codingpenguins replied on at Permalink Reply
Sorry for the delay. This could be because the navigation that you are using could be custom. If so you would have to change the code to check for this attribute.
kstansbury replied on at Permalink Reply 1 Attachment
kstansbury
I am using the Breadcrumb navigation. I do not know how to make my own navigation. I checked the box on the particular page to "exclude" it from the navigation but it still appears.
mkly replied on at Permalink Reply
mkly
The breadcrumb template doesn't honor exclude from nav. Here's a quick editied breadcrumb file that does. Make a directory at
/blocks/autonav/templates

Note: this is outside of the concrete folder.

Then create a new file named breadcrumb_exclude_nav.php and copy this code into it and place it in that folder.
You should then be able to select 'Breadcrumb Exclude Nav' template
<?php  
  defined('C5_EXECUTE') or die("Access Denied.");
  //////////////////
  // Custom template for breadcrumb that does not
  // display pages marked 'Exclude From Nav'
  //////////////////
  $aBlocks = $controller->generateNav();
  $c = Page::getCurrentPage();
  $nh = Loader::helper('navigation');
  $i = 0;
  foreach($aBlocks as $ni) {
    $_c = $ni->getCollectionObject();
    // The original breadcrumb.php does not make this check
    if (!$_c->getCollectionAttributeValue('exclude_nav')) {
      $pageLink = false;

disclaimer, I haven't actually bothered to test, but it should work. If you get any errors let me know.

Regards,
Mike

EDIT: I should not that this is certainly not a bug. The original breadcrumb file is behaving as it is intended to behave.
TeKnoZiz replied on at Permalink Reply
TeKnoZiz
It's perfect, it should be included in the next release version. Thanks!