Autonav Issue
Permalink
I am having problems with autonav.
It will not load any classes or the homepage nor any dropdowns.
Here is what I have in my header:
Here is what is output:
Any help would be welcome.
It will not load any classes or the homepage nor any dropdowns.
Here is what I have in my header:
<?php $bt_main = BlockType::getByHandle('autonav'); $bt_main->controller->displayPages = 'current'; $bt_main->controller->orderBy = 'display_asc'; $bt_main->controller->displaySubPages = '3'; $bt_main->render('templates/primary_nav'); ?>
Here is what is output:
<ul class="nav navbar-nav"> <li><a href="/inventory/">Inventory</a></li> <li><a href="/about-us/">About Us</a></li> </ul>
Any help would be welcome.
Ok. the exclude from nav was checked (don't remember checking it)
I have my own script that works just fine in plain HTML, but the output from the PHP it does not work.
I have my own script that works just fine in plain HTML, but the output from the PHP it does not work.
Could be that the classes/id required for your script aren't being used in your template (root/blocks/autonav/templates/primary_nav)?
Try adding them to the auto nav template, and that might make the script kick in?
Try adding them to the auto nav template, and that might make the script kick in?
I just injected them and still nothing.
None of the drop downs are appearing....
Here is my code
slightly modified
None of the drop downs are appearing....
Here is my code
<?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/primary_nav'); ?>
slightly modified
Can you post the original html/script etc that is working for you, and then also the custom template you are using please?
Have you tried to use any other templates to see what they output?
If you are new to hardcoding the autonav block, have a look at these posts from Jordan Lev. they are very useful:
Customising templates:
http://c5blog.jordanlev.com/blog/2011/12/customizing-the-autonav-te...
Outlining the various hard-coding options:
http://c5blog.jordanlev.com/blog/2012/04/hard-coded-autonav-options...
Re: dropdowns - You will need a script, and the correct page template. have you definitely got a script installed for it? I usually use 'Sooperfish', and there is a great tutorial from Remo Laubacher that may help you out - here:
http://www.codeblog.ch/2011/12/concrete5-sooperfish-drop-down-navig...