Forums / Developer / Strange behaviour with section show param

Strange behaviour with section show param

Author Message

Marcus Ilgner

Wednesday 19 November 2003 7:18:39 am

Hi,

I'm trying to write a template that displays the news articles from a folder structure in multiple columns. The maximum number of items in a column is also defined.
So I tried to write a section statement like this:

{section loop=$NEWSITEMS offset=$NEWS_WRITTEN_FOLDER max=$MAX_HEIGHT show=$NEWS_WRITTEN_COLUMN|lt($MAX_HEIGHT)}

But the section is also shown when NEWS_WRITTEN_COLUMN is larger than MAX_HEIGHT. Any ideas why this is? I already tried to display the content of the variables and the result of the lt-operation in each item and their values are ok (e.g. 1 for the articles which should be shown)
And can anyone tell me when it will be possible to access variables from the parent namespace in a set-command?
Atm I have 3 nested sections in one namespace because the innermost loop has to set variables from the root namespace.

Greetings
Marcus

Marcus Ilgner

Tuesday 25 November 2003 2:07:11 am

Ok, I got around this one by specifiying
{section-exclude match=$NEWS_WRITTEN_COLUMN|ge($MAX_HEIGHT)}

During debugging I got the expression that while HTML code in a section for which show==false isn't shown, other eZpublish code got executed nonetheless (set commands).
Section-exclude avoids this.

eZ debug

Timing: Jan 18 2025 20:58:36
Script start
Timing: Jan 18 2025 20:58:36
Module start 'content'
Timing: Jan 18 2025 20:58:36
Module end 'content'
Timing: Jan 18 2025 20:58:36
Script end

Main resources:

Total runtime0.0224 sec
Peak memory usage2,048.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 587.8438180.8125
Module start 'content' 0.00640.0060 768.656393.8203
Module end 'content' 0.01250.0099 862.476670.7031
Script end 0.0224  933.1797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002310.1571120.0002
Check MTime0.00104.6653120.0001
Mysql Total
Database connection0.00073.274910.0007
Mysqli_queries0.003616.169440.0009
Looping result0.00000.075420.0000
Template Total0.009542.210.0095
Template load0.00125.185810.0012
Template processing0.008336.983910.0083
Override
Cache load0.00072.989110.0007
General
dbfile0.002711.9926100.0003
String conversion0.00000.030830.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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