nav-selected not applied when not logged in?
Permalink
Hello all,
I might be missing something really obvious here but here is what happens:
When I am logged in the auto-nav assigns the appropriate nav-selected class to the active menu item. However, if I am logged out that does not happen?
What is going on and how can I fix this? Thanks!
I might be missing something really obvious here but here is what happens:
When I am logged in the auto-nav assigns the appropriate nav-selected class to the active menu item. However, if I am logged out that does not happen?
What is going on and how can I fix this? Thanks!
It's possible you changed the template of the autonav block but didn't publish the change.
Hello and thanks for the tip. I don't think so, but the menu is not added as a block it is included in the header.php (as suggested by the document discussing how to make multilanguage menus):
$block = Block::getByName('English Menu');
if( is_object($block) ) $block->display();
The auto-nav is defined in the global scrapbook, and no custom template is selected. Hope this helps somewhat. :(
I just noticed that it does assign a selected class, but to the wrong entry.
$block = Block::getByName('English Menu');
if( is_object($block) ) $block->display();
The auto-nav is defined in the global scrapbook, and no custom template is selected. Hope this helps somewhat. :(
I just noticed that it does assign a selected class, but to the wrong entry.
I found the link with the information I followed:
http://www.concrete5.org/index.php?cID=64070...
I will try to revert back to the default and then see if it stops misbehaving.
http://www.concrete5.org/index.php?cID=64070...
I will try to revert back to the default and then see if it stops misbehaving.
Yup, confirmed. :(
Reverting back to the original code fixes it. I actually had both navs on the page simultaneously, and while $a = new Area('Header Nav'); works fine, the one grom the global scrapbook invoked by $block = Block::getByName('English Menus'); doesn not, unless I am logged in. Any ideas? Thanks!
Reverting back to the original code fixes it. I actually had both navs on the page simultaneously, and while $a = new Area('Header Nav'); works fine, the one grom the global scrapbook invoked by $block = Block::getByName('English Menus'); doesn not, unless I am logged in. Any ideas? Thanks!