[support] Menu navigation block

sander-martijn lists at severeddreams.com
Tue Oct 9 15:01:19 UTC 2007


If none of these modules do what you want, you can always put a bit of 
custom code in your page.tpl.php file.  What worked for me (although I 
haven't seen all of those, one of them might do exactly what you need) 
is the following:

<?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>');
}
?>


Cog Rusty wrote:
> On 10/9/07, Fernando Silva <fsilva.pt at gmail.com> wrote:
>> Hi,
>>
>> Assuming I have a menu "Primary Links" with the following items:
>> -- Page 1
>> ---- Page 1.1
>> ---- Page 1.2
>> -- Page 2
>> ---- Page 2.1
>> ---- Page 2.2
>>
>> It is easy to put the "Page 1" and "Page 2" at top of the page. But
>> now, when I click in "Page 1" I want to have a left column block,
>> showing only the child menus.
>>
>> This is similar to what the book module does, but instead of using a
>> "book structure" it should use the "menu structure".
>>
>> Anything done to accomplish this?
> 
> 
> There are a number of modules which do something similar, either as
> their main function or as a bonus. See if some of them is a good fit
> for your case:
> 
> http://drupal.org/project/slicedmenu
> http://drupal.org/project/menu_block_split
> http://drupal.org/project/menu_trim
> http://drupal.org/project/menutree
> 
> 
>> Regards,
>>   Fernando Silva
>> --
>> [ Drupal support list | http://lists.drupal.org/ ]
>>


More information about the support mailing list