Dynamic Menu - I'm new :)
|
2 posts
|
Hello, everyone. :) I’m new with Frog, but I’m trying to learn it, and started working in a website, but wanted to place a dynamic meny, like this one: http://satprepct.com/ When you press on “Test Prep” menu, it shows the sub-menus just by passing the mouse over it. Just link the menus of this other link: http://www.trefethen.com/ What I have now isn’t like that, I need to click on the menu to appear the sub-menus and I’m trying to change it (since it wasn’t made by me). Can anyone help me? Perhaps just share an example of a menu like that? I believe the code of what I have is what I’ll paste next, but I’m not sure about it, since I’m new at this: <div id=“header”> <div id=“navigation”> <ul class=“active”> <li <?php echo url_match($this->find(’/pt’)->url)? ‘ class=“active”’: ‘’; ?>><a<?php echo url_match($this->find(’/pt’)->url) ? ‘ class=“active”’: ‘’; ?> href=”<?php echo URL_PUBLIC.’?pt’; ?>”>Home</a></li> <li <?php echo (in_array($menu->slug, explode(’/’, $this->url)) ? ‘ class=“active”’: null); ?>><?php echo $menu->link($menu->title, (in_array($menu->slug, explode(’/’, $this->url)) ? ‘ class=“active”’: null)); ?></li> </ul> Thank you in advance |
|
2 posts
|
Just to let know, I’ve solved some of my problem with this topic: |
|
2 posts
|
<a |
|
2 posts
|
Ahoy. I’m not entirely sure what you mean by “some of the problem”, but if you don’t have it totally figured out, here’s how I did what you wanted. Alrighty, first I copied and pasted this code into a snippet:
Then I included the snippet in the layout where I wanted the navbar to appear. That chunk of code creates a div which contains a list holding links of every single child of the Articles page. To get the drop-down effect, give this link a look: It adds a slick slide-out transition when you hover a navigation item with children. It even works on multiple levels. Gosh, I hope I at least made a little sense. I just had to create the same thing, so I figured I’d let you know how I did it. :P |