I have had a slightly odd request from my client for the menu on the left of my screen. I think the answer lies in changing my menu_manager template code but I'm too much of a novice to manage it.
At present, the top level of menu choice is the horizontal menu, appearing on all pages. Entering the site there is no left hand menu. Clicking a toplevel option gives you that page contents, and (on the now appearing left menu) its children as links. Subsequent clicking down into the tree always gave you that page contents and (on the left menu) its children.
The client has now requested that the lefthand menu should:
(for clarity, I'm refering to the top level as Level 1)
- At level 2, show only the children of the current page
- At any level greater than 2, show only the page's parent, its siblings, and its children if any.
Thanks in advance
The above problem has been solved with a User Defined Tag containing the following code:
-----------------------
//Call menu manager with parent of current page unless at level 2
// coded PR 31-7-2007
global $gCms;
$menuModule = &$gCms->modules['MenuManager']['object'];
$position=$params['position'];
$arg['template']=$params['template'];
$arg['collapse']=1;
if (preg_match ("/^.....\......$/", $position))
// at level 2
$arg['start_level']=3;
else
// deeper, truncate position to get parent
$arg['start_element']=preg_replace("/\......$/", "", $position);
// call {Menu ...} smarty tag
$menuModule->DoAction('default', $id, $arg);
---------------------------------
and called in the template like this:
--------------------------------
{AceLeftMenu position=$position template='ACE_Menu_Left_temp'}
---------------------------------
hope that's helpful to someone! Let me know if there's somewhere else I can put this too