[support] How to theme a menu ?
Michel Morelli
michel at ziobuddalabs.it
Tue Sep 8 14:01:19 UTC 2009
Hi all. I need to recreate this structure for a menu ("internalmenu" for
the code below):
<li><a href="a1">link #1</a></li>
<li><a href="s3">link #2</a></li>
<li><a href="o9">link #3</a></li>
(I need to insert this content into a <div><ul> tags).
I have "played" with theme and mytheme_menu_item_link() hook:
function mytheme_menu_item_link($link) {
switch ($link['menu_name']) {
case 'menu-internalmenu':
return "<li>".l(check_plain($link['link_title']),
$link['link_path'])."</li>";
break;
default:
return l($link['title'], $link['href'], $link['localized_options']);
break;
}
}
but when I see the page source I see:
<span id="thmr_42" class="thmr_call">
<span id="thmr_48" class="thmr_call">
<div id="block-menu-menu-internalmenu" class="block block-menu">
<div class="content">
<span id="thmr_47" class="thmr_call">
<ul class="menu">
<span id="thmr_44" class="thmr_call">
<li class="leaf first active-trail">
</li>
<li>
<a class="active" href="/content/pagina-1">Pagina 1</a>
</li>
</span>
<span id="thmr_46" class="thmr_call">
</span>
</ul>
</span>
</div>
</div>
</span>
</span>
I insert "internalmenu" menu into my page.tpl.php via a block contained
in a region (via /admin/build/block).
Where is my error ?
Tnx for all.
M.
--
Michel 'ZioBudda' Morelli michel at ziobuddalabs.net
Sviluppo applicazioni CMS DRUPAL e web dinamiche (LAMP+Ajax)
Telefono: 0200619074
Telefono Cell: +39-3939890025 -- Fax: +39-0291390660
http://www.ziobudda.net ICQ: 58351764
http://www.ziobuddalabs.it Skype: zio_budda
http://www.ziodrupal.net MSN: michel at ziobuddalabs.it
JABBER: michel at ziobuddalabs.it
More information about the support
mailing list