Sudden Problem Adding Top-Level Page - Auto-Nav Acts as Child Nav.. Need Help!
Permalink
Hi there, I am hoping someone will see this and help me :) I've been building a website using C5, and everything has been perfect. But today, all of a sudden, I've been having some major issues adding new pages. When I add the Auto-Nav, and specify it to show Top Level, it is instead showing Second Level... see here:
http://bopomo.vesignsolutions.com...
If you click on any of those top level links, they all work perfectly.. except "test3"... though I've added that under HOME, as a top level page... but as you see, the auto-nav displays incorrectly.. if you look in the source code of /about/ you'll see the css code is:
<div id="menu">
<ul class="nav-header">.....
</div>
So the class "nav-header" is used...
But when you go to /test3 the code is:
<div id="menu">
<ul class="nav">....
</div>
It is using the "nav" class - which is used for the Sub Nav under the blue line.
I've tried multiple times adding new pages, and sub-pages... something is wrong somewhere and i cannot figure it out :(
If you go tohttp://bopomo.vesignsolutions.com/gallery/... you'll see there are two childen... Tummies is a page which is setup correctly, to include the Top Level auto-nav.. and also show the second level ... but as soon as you click onhttp://bopomo.vesignsolutions.com/gallery/helloooo/... you'll see the nav doesn't act right... Tummies and Hellooo are added to the nav, and not under the blue line...
This page has the SAME settings, same auto-nav options as this page for example:
http://bopomo.vesignsolutions.com/about/studios/...
Which is a second level page.
Why now when I add a new page or subpage, and I add the auto-nav's the way I've always done, is it acting this way??
Does anyone have any recommendations what I can do?
I've cleared cache etc... i've disabled pretty URL's.. nothing is working..
Thanks to anyone who can help!!
http://bopomo.vesignsolutions.com...
If you click on any of those top level links, they all work perfectly.. except "test3"... though I've added that under HOME, as a top level page... but as you see, the auto-nav displays incorrectly.. if you look in the source code of /about/ you'll see the css code is:
<div id="menu">
<ul class="nav-header">.....
</div>
So the class "nav-header" is used...
But when you go to /test3 the code is:
<div id="menu">
<ul class="nav">....
</div>
It is using the "nav" class - which is used for the Sub Nav under the blue line.
I've tried multiple times adding new pages, and sub-pages... something is wrong somewhere and i cannot figure it out :(
If you go tohttp://bopomo.vesignsolutions.com/gallery/... you'll see there are two childen... Tummies is a page which is setup correctly, to include the Top Level auto-nav.. and also show the second level ... but as soon as you click onhttp://bopomo.vesignsolutions.com/gallery/helloooo/... you'll see the nav doesn't act right... Tummies and Hellooo are added to the nav, and not under the blue line...
This page has the SAME settings, same auto-nav options as this page for example:
http://bopomo.vesignsolutions.com/about/studios/...
Which is a second level page.
Why now when I add a new page or subpage, and I add the auto-nav's the way I've always done, is it acting this way??
Does anyone have any recommendations what I can do?
I've cleared cache etc... i've disabled pretty URL's.. nothing is working..
Thanks to anyone who can help!!
I don't see anything wrong, did you figure it out?
yeah i think so.. i have to click the auto-nav block and choose Custom Template and select "Header Nav" ... now if you go tohttp://bopomo.vesignsolutions.com/test3/... you'll see it's now working properly...
Now i need to find a way so that "Header Nav" is automatically selected as the default template... any ideas? Thanks!!
Now i need to find a way so that "Header Nav" is automatically selected as the default template... any ideas? Thanks!!
I think I found the issue... the auto-nav has to use a custom template "Header Nav" ... I don't remember having taken that extra step when I was building the site ... but I guess I did lol
Is there any way so that when I add and auto-nav block that is uses the custom template "Header Nav" without me having to do that each time?
Thanks!!
Is there any way so that when I add and auto-nav block that is uses the custom template "Header Nav" without me having to do that each time?
Thanks!!
You could add this to your theme pages where you navigation area code goes, see the example below;
If you go this route you don't need to specify a template all the time, it will automatically be called on each page type where you include this code.
<div id="navigation"> <?php $bt_main = BlockType::getByHandle('autonav'); $bt_main->controller->displayPages = 'top'; $bt_main->controller->orderBy = 'display_asc'; $bt_main->controller->displaySubPages = 'all'; $bt_main->render('templates/yourtemplatename'); // do not include the file extension .php just the name // ?> </div>
If you go this route you don't need to specify a template all the time, it will automatically be called on each page type where you include this code.
nice idea! I will check that out and see how it goes :) I was thinking maybe to add the auto-nav with "Heaver Nav" template, as a Scrapbook item...
the reason being, I don't want ALL pages to show the sub-nav... sometimes I don't want the sub-nav...
Thanks for your help!
I am going to remove my "test" pages and get back to working on this :)
Thanks again!
the reason being, I don't want ALL pages to show the sub-nav... sometimes I don't want the sub-nav...
Thanks for your help!
I am going to remove my "test" pages and get back to working on this :)
Thanks again!
Good luck, let us know how it goes, everyone here is very helpful, cheers.
hi again :) is there a line of php code to add to this:
<?php
$bt_main = BlockType::getByHandle('autonav');
$bt_main->controller->displayPages = 'top';
$bt_main->controller->orderBy = 'display_asc';
$bt_main->controller->displaySubPages = 'all';
$bt_main->render('templates/XXXX'); // do not include the file extension .php just the name //
?>
so that is uses the "Header Nav" custom template?
If I use that, it uses no template, and so it uses the sub-nav css classes... thanks!!
<?php
$bt_main = BlockType::getByHandle('autonav');
$bt_main->controller->displayPages = 'top';
$bt_main->controller->orderBy = 'display_asc';
$bt_main->controller->displaySubPages = 'all';
$bt_main->render('templates/XXXX'); // do not include the file extension .php just the name //
?>
so that is uses the "Header Nav" custom template?
If I use that, it uses no template, and so it uses the sub-nav css classes... thanks!!
Replace XXXX with header_nav, like this:
$bt_main->render('templates/header_nav');
awesome, thank you!!!!!