missing the default "first" class in auto-nav
Permalink
Hi,
I'm having problems with the auto-nav on my homepage.
I have a css style for the first menu-item that differs from the rest.
I read that the class="first" by default is implemented in de auto-nav block. But the html output is not showing the "first" class.
What I have done:
1. made a home.php template
2. this code in it:
3. Html - output:
The plain yoguht template has:
Can someone help me with this? I just don't know what I'm doing wrong. What is the reason the "first" class is missing?
Thanks in advance,
Mirjam
I'm having problems with the auto-nav on my homepage.
I have a css style for the first menu-item that differs from the rest.
I read that the class="first" by default is implemented in de auto-nav block. But the html output is not showing the "first" class.
What I have done:
1. made a home.php template
2. this code in it:
<div id="headerNav"> <?php $bt = BlockType::getByHandle('autonav'); $bt->controller->displayPages = 'top'; $bt->controller->orderBy = 'display_asc'; $bt->render('view'); ?> </div>
3. Html - output:
<div id="headerNav"> <ul class="nav"> <li class="nav-selected nav-path-selected"> <a class="nav-selected nav-path-selected" href="/aandacht/">Home</a> </li> <li> <li> </ul> </div>
The plain yoguht template has:
<li class="nav-selected first">
Can someone help me with this? I just don't know what I'm doing wrong. What is the reason the "first" class is missing?
Thanks in advance,
Mirjam
I've made a custom template for the autonav block that is much easier to style and add classes to in case you're interested:
https://raw.github.com/jordanlev/c5_clean_block_templates/master/aut...
To use it, you need to save that page as "view.php", then create a new folder called "autonav" in your site's top-level "blocks" directory (NOT concrete/blocks), then move the view.php file you downloaded into that new autonav folder.
-Jordan