Forums / Setup & design / Variable menu on the index-page ?
Tom Smets
Monday 12 May 2003 2:16:29 am
Hi,
I started working with eZ3 for a few weeks now. I'm developing my first real site and encountered a menu related problem.
I'd like a menu on the left side, which can show all the members. These members should be viewed: 1. By Name | 2. By Category.So I've got two hyperlinks on top op the menu-structure (by name | by category) and when a user selects a link, the left menu should change dynamicly.
Does anyone got an idea on how accomplishing this ?
Kind regards
Selmah Maxim
Monday 12 May 2003 3:23:31 am
Hi ..
You mean you have 2 menu, the top menu is the main, and the left menu is the childe menus, when user click on the top (main manus) the left menu should sort the childe menu of this main menu ?!
such what ez.no have ?
Monday 12 May 2003 7:08:05 am
No, that's not exactly what I mean.I've got one left menu, with two links on top of the menu.
This scheme of the left-menu may clear things out:
Name | Category -------------------- child child child....
When 'Category' is clicked, the child menu should change, and vice-versa with the 'Name' link.
These things are so easy to accomplish with javascript or native php, but with the eZ Template Language it isn't so easy anymore...
Monday 12 May 2003 8:13:45 am
hmm ...
I think u need kind of with this way maybe will work :
1. make folder with 'Name' name 2. make folder with 'Category' name3. try this code :
{section show=eq($node.node_id,'THE_NAME_FOLDER_ID')} {$node.name} {/section} {section show=eq($node.node_id,'THE_Category_FOLDER_ID')} {$node.object.class_name}{/section}
am not sure if this will work, but i think also easy to do it with eztemplate language !
Monday 12 May 2003 8:15:59 am
i forget something, the links :
<a href={"/content/view/full/NAME_FOLDER_ID/"|ezurl}>Name</a><a href={"/content/view/full/NAME_Category_ID/"|ezurl}>Name</a>
Monday 12 May 2003 1:11:38 pm
Thanx,
the code you suggested worked fine. The only glitch is that the content of that folder is displayed in the main area of my site.But I'll get a solution by creating a full_node_#.tpl file for that issue.
again, many thanx