Closed (works as designed)
Project:
Auto Menu
Version:
5.x-1.0
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Jun 2008 at 18:51 UTC
Updated:
10 Oct 2008 at 15:30 UTC
hello,
I got few problems with the built in menu of drupal and found this module. I have added it to my moduls and enabled it but do not know what is next.
to go a little further: I have been looking for a way to to built a special menu block for each primary link and found this code for a block
<?php
// get the menu items that lead to the current menu item
$active_trail =_menu_get_active_trail();
// get the menu id of the active top-level link
$mid = $active_trail[0];
// get the primary menus id
$pmid = variable_get('menu_primary_menu', 0);
//do they match?
if ($active_trail[0] == $pmid)
echo theme('menu_tree', $active_trail[1]); //create a tree starting from level 2
?>It makes al the childes of the primary links displayed in a special block. Do I have posibilities to use it with this module? Or what can be an other good way?
Thanks,
Sebastian
Comments
Comment #1
mattez commentedAfter installation you can set default hierarchy parent for the specific content type. Goto Admin -> Content Type -> (edit your type) -> there is AUTO MENU select on the bottom of edit page.
Note: it works only, if user (editor) have permissions to Menu Module AND there is no menu setup for node.
Comment #2
danielfs commentedSorry for the delay, wineroute. I've been quite busy AND I postponed this issue since I couldn't understand what you meant in my first quick-read. I'm not 100% sure I understand you now, but...
First things first: the code you've posted does NOT create any menu. It DISPLAYS a menu three starting at the second level from the primary links menu.
That said, there's nothing preventing auto menu to work with that code. All you have to do is setup automenu to use your primary links menu as the parent for the new menu items. If this is not convenient (you want the automatic menus somewhere else in the menu tree), then you'll have to adapt the code you posted so that it gets the proper menus for printing. Check the menu module API documentation at drupal.org for that.
Hope this answers your question.