Jump to content

Recommended Posts

Posted

I want to remove the "Home" page from the navbar, but keep the other pages (About, Templates, etc) on the navbar? How is this done?

 

 

Posted

Hi @wiredny, welcome to the forum.

Please be more precise. What navbar are you talking about? Are you using one of the default site profiles? Can you share the code that is rendering the menu?

Posted

Yes, I am using the default profile. The navbar appears on the homepage.  I fixed the problem by going into site/templates/header.inc and commenting out the line"$children->prepend($homepage);" within the following code snippet:


            
                // Create the top navigation list by listing the children of the homepage. 
                // If the section we are in is the current (identified by $page->rootParent)
                // then note it with <a class='on'> so we can style it differently in our CSS
                // and add a text that is visually hidden, but available for screen readers.
                // In this case we also want the homepage to be part of our top navigation, 
                // so we prepend it to the pages we cycle through:
                
                $homepage = $pages->get("/"); 
                $children = $homepage->children;
                // $children->prepend($homepage); 
        

 

  • Like 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...