Wednesday 13 October 2004 3:11:48 am
I had a similar problem and wanted to manually assign top and left folders to menu selections The EzPublish menu selection mechanism does an excellent job of setting-up left and right menu navigation. But I wanted to explicitly control the folders that were on the top and left menus. Here is my method please let me know of better techniques I'm an EzPublish beginner! Step1) Firstly we must mark the folder class with an additional attribute. I chose to use left, right; or not applicable and called the attribute menu_position;. Do this by adding a selection attribute to the folder class in the administration menu. Step 2) Now, we must change the code to select and populate our topmenu. Copy the base flat_top.tpl template into your design/<your-site>/templates/menu directory and add the attribute filter as shown below to the fetch logic (the 1 corresponds to top, 2 to left and 0 to not applicable)
menuitems=fetch( content, list, hash( parent_node_id, 2,
class_filter_type, include,
class_filter_array, ezini( 'MenuContentSettings', 'LeftIdentifierList', 'menu.ini' ),
attribute_filter, array(array('folder/menu_position','=',1)),
sort_by, $root_node.sort_array ) )}
Step 3) Now we must code the left menu. I chose to copy the top_menu.tpl code and renamed it to my_left.tpl. I then altered the first three lines to:
<div id="leftmenu">
<div id="leftmenu-design">
<h3 class="hide">{"Left menu"|i18n("design/base")}</h3>
Step 4) Now make sure that you alter the siteaccess/<your site>/menu.ini.append.php file to ensure the correct menu scheme is being used - for instance:
[SelectedMenu]
CurrentMenu=LeftTop
TopMenu=flat_top
LeftMenu=my_left
Hope this helps.
Cheers Kevin
|