Navigation menu with sublevels
Hi all!
I have trouble with navigation menu modul.
Site structure is:
- item1
-- subitem1
-- subitem2
-- subitem1
- item2
When i click on item1 i see all subitems & item1 have "active" class. But when i click on subitem1 i see "active" subitem and item1 is not "active".
How can i make all parent items with class "active"?
Re: Navigation menu with sublevels
All parent navigation items should have a class of "trail" applied to them.
viewtopic.php?f=7&t=1343&start=10&hilit=trail#p562 3
Re: Navigation menu with sublevels
Medianomaly, thanks for your reply.
Some code....
Active item
Code:
[*]<span class="l"><span class="r">...</span></span>
inactive items for first line havn't <span> tag
Active subitem that i need
Code:
[*]<span class="active">...</span>
So i need define html's entry for each state of active\inactive items\subitems :)
Re: Navigation menu with sublevels
Sorry -- I know there is a language barrier here...
You shouldn't have to change any HTML. Normally, TYPOlight adds a 'class="active"' to the current page, but also a 'class="trail"' to all parents of the page. So you can use CSS to add styles to ".trail" in the same way you are doing with ".active".
But if your "item1" page doesn't have a class of "trail" -- what version of TYPOlight are you using?
Re: Navigation menu with sublevels
Barrier, yes :) Sorry
I mean i NEED additional html tags.
Maybe pictures say more
http://kalt.diveasia.ru/text.png
level one items have round corners, you see.
I try to hardcode nav_ template, but sublevels is clone of the mainlevel. And i don't know what doing. Have any ideas?
Re: Navigation menu with sublevels
Quote:
Originally Posted by Isgaard
I try to hardcode nav_ template, but sublevels is clone of the mainlevel. And i don't know what doing. Have any ideas?
You can recognize levels like this:
[code=php:9zqp4mwy]<span class="syntaxhtml">
<?php*if*(strpos($this->level,*'level_1')*!==*false):*?>
additional*html*tags*go*here
<?php*endif;*?>
</span>[/code:9zqp4mwy]
Re: Navigation menu with sublevels