Variable menu on the index-page ?

Author Message

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 ?

Tom Smets

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...

Selmah Maxim

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' name
3. 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 !

Selmah Maxim

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>

Tom Smets

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 10:59:42
Script start
Timing: Jan 18 2025 10:59:42
Module start 'layout'
Timing: Jan 18 2025 10:59:42
Module start 'content'
Timing: Jan 18 2025 10:59:43
Module end 'content'
Timing: Jan 18 2025 10:59:43
Script end

Main resources:

Total runtime0.8433 sec
Peak memory usage4,096.0000 KB
Database Queries66

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.0313152.6250
Module start 'layout' 0.00550.0031 741.656339.4609
Module start 'content' 0.00860.8334 781.1172507.2188
Module end 'content' 0.84210.0012 1,288.335912.1563
Script end 0.8433  1,300.4922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3709160.0002
Check MTime0.00130.1507160.0001
Mysql Total
Database connection0.00090.108710.0009
Mysqli_queries0.787693.3950660.0119
Looping result0.00060.0658640.0000
Template Total0.804195.320.4020
Template load0.00190.222620.0009
Template processing0.802295.122620.4011
Template load and register function0.00020.021710.0002
states
state_id_array0.00130.151210.0013
state_identifier_array0.00090.107420.0005
Override
Cache load0.00160.1898480.0000
Sytem overhead
Fetch class attribute can translate value0.00050.062520.0003
Fetch class attribute name0.00150.178160.0003
XML
Image XML parsing0.00020.025020.0001
class_abstraction
Instantiating content class attribute0.00000.001160.0000
General
dbfile0.00360.4228100.0004
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 5

Time used to render debug report: 0.0003 secs