Results 1 to 2 of 2

Thread: Dropdown navigation onClick

  1. #1

    Default Dropdown navigation onClick

    Hello,

    Im trying to make a dropdown navigation where the subitems (level_2) only show when clicked on its parent (level_1). This means I have to some how deactivate the level_1 link, kind of like the way that contao.org´s navigation is build, but with click instead of hovering. Make sense? Can anyone give me a clue on this? THANKS!

    Christian

  2. #2
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: Dropdown navigation onClick

    Horizontal or Vertical?
    You could modify the nav_default template so that the "a" has an href calling a javascript onclick if $this->level == 'level_1',
    instead of its usual href="php echo $item['href'];"
    The actual javascript called could be placed in the nav_default template too in the same "if" block (so it is only written once when level_1 is processed)
    The tricky part is finding the right javascript to call - or writing it.

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
  •