section show OR-statement

Author Message

David Eriksson

Tuesday 05 July 2005 2:41:47 am

Is it possible to use OR and AND in {section show=}? I've tried a few different solutions, for example:

{section show=array('or', statement1, statement2)}

{section show=statement1 show=statement2}

The first one seems to always turn out true, I suspect it's because a non-empty array equals true.

When doing it the second way the decision seems dictated by whichever statement comes last.

There's not much code within the {section}, but I'd still really prefer not having to duplicate it.

/David

David Eriksson

Tuesday 05 July 2005 3:24:36 am

Solved; with the simple:

{section show=or(statement1, statement2)}

Found it when looking through one of the menu templates.

/David

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 19 2025 09:12:34
Script start
Timing: Jan 19 2025 09:12:34
Module start 'layout'
Timing: Jan 19 2025 09:12:34
Module start 'content'
Timing: Jan 19 2025 09:12:34
Module end 'content'
Timing: Jan 19 2025 09:12:34
Script end

Main resources:

Total runtime0.0210 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.0070 589.1484152.6250
Module start 'layout' 0.00700.0053 741.773439.4453
Module start 'content' 0.01230.0064 781.218889.2109
Module end 'content' 0.01870.0023 870.429730.3047
Script end 0.0210  900.7344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003114.8737140.0002
Check MTime0.00157.3225140.0001
Mysql Total
Database connection0.00104.883910.0010
Mysqli_queries0.005023.678830.0017
Looping result0.00000.123510.0000
Template Total0.00199.010.0019
Template load0.00115.059510.0011
Template processing0.00083.928010.0008
Override
Cache load0.00083.756910.0008
General
dbfile0.00115.247580.0001
String conversion0.00000.057840.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