Results 1 to 7 of 7

Thread: Navigation menu with sublevels

  1. #1
    User
    Join Date
    12-09-09.
    Location
    Russia, Moscow
    Posts
    48

    Default 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"?

  2. #2
    Experienced user
    Join Date
    08-21-09.
    Posts
    563

    Default 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
    Brian

  3. #3
    User
    Join Date
    12-09-09.
    Location
    Russia, Moscow
    Posts
    48

    Default 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

  4. #4
    Experienced user
    Join Date
    08-21-09.
    Posts
    563

    Default 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?
    Brian

  5. #5
    User
    Join Date
    12-09-09.
    Location
    Russia, Moscow
    Posts
    48

    Default Re: Navigation menu with sublevels

    Barrier, yes Sorry
    I mean i NEED additional html tags.

    Maybe pictures say more

    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?

  6. #6
    User
    Join Date
    07-26-09.
    Posts
    175

    Default 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]

  7. #7
    User
    Join Date
    12-09-09.
    Location
    Russia, Moscow
    Posts
    48

    Default Re: Navigation menu with sublevels

    Thank's! I'll try

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •