[support] How to theme a menu ?

Ramon Vilar Gavaldà ramon.vilar at gmail.com
Tue Sep 8 14:31:56 UTC 2009


Hi
The elements like:

<span id="thmr_42" class="thmr_call">

are inserted by Devel module. If you disable de Devel block or look at
your source code with right clicking in your browser, you won't see
any more this structure.

I wish that this information helps you.

Ramon


2009/9/8 Michel Morelli <michel at ziobuddalabs.it>:
> 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
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>



-- 
Ramon Vilar Gavaldà - http://ramonvilar.facil.cat - http://blog.facilitant.net
Membre de FÀCIL - http://www.facil.cat
Membre de l'esplai SESA - http://www.esplaisesa.org


More information about the support mailing list