How to use URI in the conditional statements?

Author Message

nga patel

Thursday 17 March 2005 9:30:31 am

Hi,
I am a beginner and I encountered a problem with URI in the pagelayout.tpl.
I have five elements in main menu and with all five sections, there is a different sub-menus and these submenus contains several number of elements. I want to set the page like that when I click on any element of main menu it comes with its submenu and when I click on any element inside the submenu the arrow is shown against that element.
Now for the first problem I have used one idea by putting following strings in the pagelayout.tpl file:

PARENT NODE ID : {$parent_node.node_id}
  {section show=$parent.node_id|eq(59)}
     
  
            {include uri="design:presentation.tpl"}
     
{/section}
  {section show=$node.node_id|eq(60)} 
  
            {include uri="design:notre_metier.tpl"}
   
   {/section}

In above example i had just give two element of main menu and i succeed into getting the corresponding sub menu.
But I think for the second problem with the presentation of arrow against element of submenu, the above way can work but it is not too logical.
For more detail you can refer the following site:
http://www.iclab.net
So, anyone could help me in this problem

Thanks for reading me.

Ɓukasz Serwatka

Thursday 17 March 2005 11:07:10 pm

Hi,

It`s great that you want to use eZ pub, welcome to eZ publish community :)

I suppose that you have already read TSCM tutorial, if not it`s very good at the beginning.
http://ez.no/ez_publish/documentation/toc/(from)/36647

Have you read this document?
http://ez.no/ez_publish/documentation/customization/tips_tricks/creating_tree_menus

Some examples of code you can find also in double_top.tpl in design/base/templates/menu/

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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 31 2025 06:28:01
Script start
Timing: Jan 31 2025 06:28:01
Module start 'layout'
Timing: Jan 31 2025 06:28:01
Module start 'content'
Timing: Jan 31 2025 06:28:01
Module end 'content'
Timing: Jan 31 2025 06:28:01
Script end

Main resources:

Total runtime0.0279 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0093 588.2656151.2266
Module start 'layout' 0.00930.0038 739.492236.6797
Module start 'content' 0.01310.0131 776.171990.3125
Module end 'content' 0.02630.0016 866.484429.9922
Script end 0.0279  896.4766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002810.0329140.0002
Check MTime0.00114.0271140.0001
Mysql Total
Database connection0.00124.145810.0012
Mysqli_queries0.004114.786430.0014
Looping result0.00000.103310.0000
Template Total0.00103.710.0010
Template load0.00082.824510.0008
Template processing0.00030.902210.0003
Override
Cache load0.00051.829210.0005
General
dbfile0.00176.260980.0002
String conversion0.00000.044440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs