By gingic on
Hello I have a javascript type Menu (Primary Links) that display when hovered a Submenu (Secondary Links) based on the rel option like this:
//Primary Menu Links
<div id="menu">
<ul>
<li><a href="#" rel="gc1"><span>LINK1</span></a></li>
<li><a href="#" rel="gc2"><span>LINK2</span></a></li>
<li><a href="#" rel="gc3"><span>LINK3</span></a></li>
<li><a href="#" rel="gc4"><span>LINK4</span></a></li>
<li><a href="#" rel="gc5"><span>LINK5</span></a></li>
<li><a href="#" rel="gc6"><span>LINK6</span></a></li>
</ul>
</div>
//Secondary Menu is based on the rel option of primary links:
<div class="tabcontainer">
<div id="gc1" class="tabcontent">
<p><a href="#">SUBLINK11</a>|<a href="#">SUBLINK12</a></p>
</div>
<div id="gc2" class="tabcontent">
<p><a href="#">SUBLINK21</a>|<a href="#">SUBLINK22</a>|<a href="#">SUBLINK23</a></p>
</div>
<div id="gc3" class="tabcontent">
<p><a href="#">SUBLINK31</a>|<a href="#">SUBLINK32</a>|<a href="#">SUBLINK33</a>|<a href="#">SUBLINK34</a>|<a href="#">SUBLINK35</a>|<a href="#">SUBLINK36</a>|<a href="#">SUBLINK37</a></p>
</div>
<div id="gc4" class="tabcontent">
<p><a href="#">SUBLINK41</a>|<a href="#">SUBLINK42</a>|<a href="#">SUBLINK43</a></p>
</div>
<div id="gc5" class="tabcontent">
<p><a href="#">SUBLINK51</a>|<a href="#">SUBLINK52</a>|<a href="#">SUBLINK53</a></p>
</div>
<div id="gc6" class="tabcontent">
<p><a href="#">SUBLINK61</a></p>
</div>
</div>
It seems that foreach is not useful...do you have a solution how to make a for to cycle this?
Thank you
Comments
theme_links
I did a quickie modification to theme_links, http://api.drupal.org/api/function/theme_links
Perhaps a hardcore programmer can suggest something more, I'm more of a part timer:)
I dropped the span tags in there also.
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
Thank you Jeff
This project is my own personal first drupal one, I will surely test it the menu and let you see how it looks like. Thank you I really appreciate your efforts
...
I forgot to mention there is also the Nice menus module, and the jquery plugin "Superfish" is pretty easy to get working in Drupal, take a look at the Pixture Reloaded theme for an example.
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
Hello Jeff
I have now idea how to use the function.
however i am pretty confused because the primary links load in a first set of div while secondary links in another one like this:
I have failed tried to make the menu work... i have tried to call the function from the page.tpl.php like in many ways smth like this:
maybe you can help me get out of this confusion.. i will endup using superfish but it does do the same thing and i am afraid i will face the same problem.
Thanks a lot
Using Pixture Reloaded
it seems the Superfish is a nice option. I am using now the Pixture Reloaded Theme which has Superfish dropdown menu. I can alter it to make it nav-bar style as I needed just doing 2 things:
1. Adding superfish-navbar class...DONE
2. Adding sf-navbar class to the ul that builds up the menu...here i got stuck for i cannot find where the
is found at the theme level? Can you show me where this
?
If I found it this issue is fixed
Thank you