Nav-Path-Selected
Permalink
I'm trying to utilize the nav-path-selected on autonavs. I use a built-in, non-editable auto-nav in my themes with:
But I would like whatever path that I've got selected to be styled with the nav-path-selected class, but it always has the home page with the nav-path-selected class as well. Is there any way that I can only have the home page in the nav-path-selected class if the page itself is selected?
<?php $bt_main = BlockType::getByHandle('autonav'); $bt_main->controller->displayPages = 'top'; $bt_main->controller->orderBy = 'display_asc'; $bt_main->controller->displaySubPages = 'none'; $bt_main->render('templates/level1'); ?>
But I would like whatever path that I've got selected to be styled with the nav-path-selected class, but it always has the home page with the nav-path-selected class as well. Is there any way that I can only have the home page in the nav-path-selected class if the page itself is selected?
To clarify... The code I posted above would be in a custom autonav template.
-Steve
-Steve
Thanks Shotster,
Can I hard-code the fact that I want to use a custom template into my template? I.E. Using the example above, how could I tell it to use this custom template?
Can I hard-code the fact that I want to use a custom template into my template? I.E. Using the example above, how could I tell it to use this custom template?
-Steve