By f1vlad on
Hi guys, I am really puzzled by this and hoping someone can help.
My menu list, due to design has to be in
. Each menu item must be in
. So when I create a custom block and menu in there, it uses
- and
- . I have found a way to overwrite theme on a level of entire block but cannot figure out how I can access theme on internal content.
When I do print_r($block) this is what I get:
stdClass Object ( [module] => menu [delta] => 113 [theme] => ngycp [status] => 1 [weight] => 0 [region] => right [custom] => 0 [throttle] => 0 [visibility] => 0 [pages] => [title] => [subject] => contentright [content] => <ul class="menu"> <li class="leaf"><a href="/site/state/vt/%2523">Bulletin Board</a></li> <li class="leaf"><a href="/site/state/vt/%2523">Photo Galleries</a></li> <li class="leaf"><a href="/site/state/vt/%2523">Success Stories</a></li> </ul> )See I need every one of the menu item to be inside a
with an ID. Is it possible to get done properly?I mean I am sure I can explode this via explode("\n",$block->content) and somehow work with what I got, but that will be run on every node call, that will be too heavy for my server considering traffic. And needless to say it's not a proper way. Is there any way to modify this otherwise?
Please help,
Thanks,
Vlad
Comments
Sorry, I see my tags were
Sorry, I see my tags were stripped...
What I need is instead of this:
I need this
thanks and sorry for overlooking post above, I can't find a way to edit it.
Why?
You could do a regex replace on the content, but why? What would be the point of that?
The point is that I am a
The point is that I am a coder and design that was done need DIVs not LIs. I could do what you suggest but that will not be smart it'll be heavy load on server.
This can probably be done by
This can probably be done by using the theme system to override theme_menu_tree() and theme_menu_item(). Post back if you need clarification.
- Corey
Thank you very much! Works
Thank you very much! Works very well!
Restricting the overide per region
Is there a way to override theme_menu_tree() per region?
I'd like to have a navigation bar on the top of my screen that renders only 1st level menu items and not sub-menu items. However, should the menu appear elsewhere, I'd like it to behave normally.