Back when I used 4.7 I had no problem converting my primary links into a unordered list. Now in 5.0 however, I can't get this to work.
So back in the 4.7 days I did something like this:
<?php
print '<ul>';
foreach ($primary_links as $link) {
print '<li>'. $link .'</li>';
}
print '</ul>';
?>And your primary links are all set to be in a unordered list with additional
- 's
- 's(cildren of children..see an eg. under).
Now in 5.0 however this is an issue for me.
According to documentation, the right way is(to output primary links):
<?php print theme('links', $primary_links); ?>ok, this gives me the primary links. But not the children of those links.
Apperantly I was missing something...
<?php print theme('links', $primary_links, array('class' =>'primary_links', 'id' => 'navlist')); ?>but no luck.
So looking at the html output(eg turn of styling under firefox), and you can see the unordered i clean html. Would look something like this. But that is not the case with my primary links. And this is how I want my primary links to appear with no styling:
Anyone?
Comments
this got ugly, sorry.But,
this got ugly, sorry.
But, when I have my primary links displayed as this unordered list example in my previous post, then I can applie some css code that makes this a quite beautiful menu.
Like in the example menus presented here: http://www.cssplay.co.uk/menus/drop_examples.html
So anyone who can point me in the right direction here would be a saint! ;)
morphir.com
have you checked the projects directory
I thought I saw a module a while back "advanced_menu" or something like that that did what you're looking. I would search for "menu" in the projects list and am sure you will find it.
Have fun.
/c4rider
I think this may do the trick
Changing
to
should give you your unorder list.
thank you nevets! It does
thank you nevets!
It does give me a unordered list, but not expanded(not children of the links). You got that one covered as well?
At least now I'am one the right track here :)
morphir.com
here is the clue..
My original theme function looks like this:
To get the ul-listing AND expanded, I did:
However, if you look at the first theme function(the original one) it contains an array that assigns the class
menu_tree primary_menu. This gives me the class .primary_menu which is easy to work with.
So the only issue I'am facing now, is how to assign this class to my last theme function.. Care to fill me in?
morphir.com
I have been trying to do the same thing
Go take a look at two posts I have made trying to do the same thing...Here are the links...
http://drupal.org/node/128397
and
http://drupal.org/node/132992
I am working with someone right now who is writing the code to allow me to do almost the exact same thing that you are going to be doing...Check out the posts and see...If thats what you want, get back to me and when I get the code, I can let you know...