By jaarong on
It seems as though 4.7 wants to make a move in this direction, but I'm unsure how to implement it programmatically in my template. I would like any sub-menu links of the primary links menu to display when the menu item is clicked.
Comments
Use Nice Menus
I was recently trying to do exactly what you ask, then I found the Nice Menus module. Place a block at the top and use drop-down menus.
Did you try making a two
Did you try making a two level menu, set it as Primary Links as well as Secondary Links in menu settings? Doing so will make Drupal display the children of the first level items when they're clicked. I used that technique here:
http://www.sjutjugo.se
Cheers,
--
Jakob Persson
Drupal developer, web designer and usability consultant
http://www.jakob-persson.com
--
Jakob Persson - blog
Leancept – Digital effect and innovation agency
That's exactly what I want
That's exactly what I want to do. What kind of PHP code does it take to do this?
Gamecron Gaming
None! Just do like I wrote
None! Just do what I wrote above. :)
--
Jakob Persson
Drupal developer, web designer and usability consultant
http://www.jakob-persson.com
--
Jakob Persson - blog
Leancept – Digital effect and innovation agency
Not Working
I tried this - My menu settings specify that Primary Links and Secondary Links are both contained within the menu 'Primary Links'. I then set up several Primary Links. (i.e. 'Home' 'About').
Each primary link contains a secondary link (i.e. 'About Us' has the parent of Primary Link 'Home', 'Our Company' has the parent of Primary Link 'About').
The first Primary Link shows no Secondary Links - each subsequent Primary link shows the exact same Secondary Links. In other words, there is no relationship between the Primary and Secondary links. The same two Secondary links display, no matter which Primary Link I click on - and NO Secondary Links show up when the first Primary Link is clicked.
Hi zucker, did you resolve
Hi zucker,
did you resolve it?
My Drupal 5.1 works exactly as bad as you've described....
Hello mblazke
Nope, I never got this to work. I think I'll take a look at nice menus mentioned above. I did use a technique described in the Showcase Forum to get a secondary menu at http://www.noregifting.com. The only main link that currently has secondary links is 'How It Works'...
A link
Could you please give us a link to this article you are talking about?
Thanks!
Here you go!
In the showcase forum, go here: http://drupal.org/node/110343
There are many comments, so you'll have to scroll down. He provided a link to the site where the menu can be found: http://www.dynamicdrive.com/dynamicindex17/tabcontent2.htm
When I went there, it didn't seem to be exactly the same menu. If you view his page source, it makes it a little easier to understand how to configure: http://www.artistshousemusic.com
How to set secondary links as children to primary links?
Hi,
I searched many links so far and i could not get right thread that matches to my requirement. Many of them explain with code snippets. While i was searching more, i got this thread and i am looking for help to configure the menu links something like this in this site.
http://www.sjutjugo.se/
Could some one help me how to configure the secondary links under primary links. I already tried the following steps so far.
Administer > Menus > : Created Primary Links and Secondary links as Menus
Administer > Menus > Settings : All the drop down lists are pointing to Primary links.
Thanks,
Paradesi
If it's of any help to you,
If it's of any help to you, here's the relevant code from that site. It runs Drupal 4.7.
In your theme:
page.tpl
...
Then make a menu with at least two levels, a menu tree, like this:
Finally set both Primary and Secondary Links to the menu you just made.
Now when you click "two", the second level will display: "dolphin, elephant, fruit".
Since it's been a while since I built that site I just checked and there are no extra functions in template.php for this to work.
--
Jakob Persson
Drupal developer, web designer and usability consultant
http://www.jakob-persson.com
--
Jakob Persson - blog
Leancept – Digital effect and innovation agency
Did not help me for creating secondary links
Hi,
I added the above code snippet to page.tpl.php file for the selected theme (aberdeen). But i see the same primary links appeared in place of secondary links as duplicate links even though primary links are already available in original position. Finally i see two sets of primary links in both the places. Is there any other fix for this ?
Thanks,
Ram
Create unique content
Bene - www.bene.be
I wonder if you want to create your menu first, I mean, do you have already made your content, your pages or stories, etc...?
I was having the same problem, but I found out that if you create your pages first, so like in the example above:
- colors (create a page and call it colors or something like that)
-- blue (create a page and call it blue)
-- red (same)
-- green (same)
now, return to your menu and in the path field, enter the name of the page you want your menu item to point to, if the page is unique, Drupal will show the secondary level of links in your primary link bar.
It is just beginning to work, so I have a lot to discover myself...
Finally i got it working !!
Hi,
I got the secondary links working, but are they not supposed to show up for non members of the site?
Here is my sample site: www.paradesi.net
Thanks,
Paradesi
I'm having the same problem.
I'm having the same problem. It looks like it works but non-members don't get to see the the secondary links. If anyone knows how to solve this, please explain what that solution is.
Can non-members see the secondary links?
Hi,
Could you share the solution for this?
Thanks
Paradesi