How to set the 'show' parameter for the 'section' function?

Author Message

Iris Hoekstra - Roscam Abbing

Thursday 01 April 2004 2:19:30 am

Hi there,

I am trying to write some code which is only executed if a certain condition is met.

I do this:
{section show=$DesignKeys:used.class|eq(1)}
conditional code goes here
{section-else}
do nothing
{/section

I also print out $DesignKeys:used.class to the screen, and there I can see that it is in fact 13. But the conditional code is still executed. What am I doing wrong?

Paul Forsyth

Thursday 01 April 2004 3:45:34 am

Try:

{section show=eq($DesignKeys:used.class,1)}
conditional code goes here
{section-else}
do nothing
{/section}

paul

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 20:55:50
Script start
Timing: Jan 18 2025 20:55:50
Module start 'layout'
Timing: Jan 18 2025 20:55:50
Module start 'content'
Timing: Jan 18 2025 20:55:51
Module end 'content'
Timing: Jan 18 2025 20:55:51
Script end

Main resources:

Total runtime0.6456 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.1563152.6563
Module start 'layout' 0.00500.0030 740.812539.4922
Module start 'content' 0.00800.6361 780.3047458.3516
Module end 'content' 0.64410.0015 1,238.65638.2656
Script end 0.6456  1,246.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4666160.0002
Check MTime0.00130.1963160.0001
Mysql Total
Database connection0.00090.135010.0009
Mysqli_queries0.606994.0054540.0112
Looping result0.00040.0633520.0000
Template Total0.619395.920.3097
Template load0.00200.302820.0010
Template processing0.617495.617920.3087
Template load and register function0.00020.032110.0002
states
state_id_array0.00070.108110.0007
state_identifier_array0.00070.107520.0003
Override
Cache load0.00160.2497150.0001
Sytem overhead
Fetch class attribute can translate value0.00070.114220.0004
Fetch class attribute name0.00100.159320.0005
XML
Image XML parsing0.00020.034820.0001
class_abstraction
Instantiating content class attribute0.00000.000920.0000
General
dbfile0.00180.2722100.0002
String conversion0.00000.001440.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs