[support] Retrieve item on same menu level

Marolijo - Pol maresma marolijo at yahoo.es
Tue Mar 11 22:09:42 UTC 2008


It works! I only need to modify the CSS now.

Thank's a lot!

> -----Mensaje original-----
> De: support-bounces at drupal.org 
> [mailto:support-bounces at drupal.org] En nombre de sander-martijn
> Enviado el: dimarts, 11 / març / 2008 23:00
> Para: support at drupal.org
> Asunto: Re: [support] Retrieve item on same menu level
> 
> I think there are a couple ways to do this - here's a 
> solution I used in page.tpl.php for a theme I was developing recently.
> 
> <?php
> 
> $trail = _menu_get_active_trail();
> $mid = $trail[1];
> if($mid != 5){
>    $output .= theme('menu_item', $mid);
>    $output.= theme('menu_tree',$mid);
>    print('<ul class="leftnavmenu">');
>    print $output;
>    print('</ul>');
> }
> ?>
> 
> 
> It does something a bit different than what I think you want 
> to do - it gets the current top level and prints all of it's 
> children.  So if you were at 1, 1.1 or 1.2 it would print 
> those 3 but none of the things under 2.  However this should 
> get you started towards what you need.
> 
> .s
> 
> Marolijo - Pol maresma wrote:
> > How can I do that?
> > 
> >  > Item 1
> >  >> Subitem 1.1
> >  >> Subitem 1.2
> >  > Item 2
> >  >> Subitem 2.1
> >  >> Subitem 2.2
> > 
> > On node template i need to list the item on same level, ex: 
> sub1.1 and 
> > sub1.2
> > 
> > Thank's
> > 
> > Pol Maresma
> > PolNetwork.com / Serveis d'Internet
> > msn: marolijo
> > 
> -- 
> [ Drupal support list | http://lists.drupal.org/ ]
> 
> __________ Informacisn de NOD32, revisisn 2938 (20080311) __________
> 
> Este mensaje ha sido analizado con  NOD32 antivirus system
> http://www.nod32.com
> 
> 




More information about the support mailing list