Sections namespaces and set's

Author Message

Pablo C. Vergara Castro

Wednesday 30 June 2004 4:23:06 am

Hi to all

I have this lines

{let $table=fetch(content,list,array(_PARAMS_))
a=''}
{section name=$row loop=table}
{*The next sextion only show if the value of a is not equal to the value of an content objet attribute*}
{section show=$a|ne($row.object.data_map._CONTENT_OBJECT_ATTRIBUTE_)}
{set a=$row.object.data_map._CONTENT_OBJECT_ATTRIBUTE_} <====MY PROBLEM
{/section}
[...]
{/section}
{/let}

I have noticed that when I eliminate "name" from "section" the value of a it's updated but if I put name in section the value of a is not updated, can give a somebody solution me?

Paul Forsyth

Wednesday 30 June 2004 4:47:06 am

Change:

 {section name=$row loop=table}

to:

 {section name=row loop=$table}

and try again.

I would use the var= parameter instead of name. It simplifies things greatly. See:

http://ez.no/ez_publish/documentation/reference/template_functions/program_flow/section

paul

--
http://www.visionwt.com

Pablo C. Vergara Castro

Wednesday 30 June 2004 4:57:19 am

Maybe I write wrong the code because the problem is not in this code (I put the lines like you said and nothing :-( ), the problem is when I try to set the a variable inside two sections and differents namespaces.

See that:

http://ez.no/ez_publish/documentation/development/libraries/ez_template/basics/namespaces_/no_more_set

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 19:24:32
Script start
Timing: Jan 18 2025 19:24:32
Module start 'layout'
Timing: Jan 18 2025 19:24:32
Module start 'content'
Timing: Jan 18 2025 19:24:33
Module end 'content'
Timing: Jan 18 2025 19:24:33
Script end

Main resources:

Total runtime1.3816 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 587.9141152.6250
Module start 'layout' 0.00560.0029 740.539139.4453
Module start 'content' 0.00851.3713 779.9844471.9297
Module end 'content' 1.37970.0018 1,251.91418.1641
Script end 1.3816  1,260.0781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2467160.0002
Check MTime0.00140.0980160.0001
Mysql Total
Database connection0.00080.058910.0008
Mysqli_queries1.323195.7678570.0232
Looping result0.00060.0419550.0000
Template Total1.351697.820.6758
Template load0.00240.175920.0012
Template processing1.349297.653920.6746
Template load and register function0.00020.017110.0002
states
state_id_array0.00190.137210.0019
state_identifier_array0.00250.177620.0012
Override
Cache load0.00200.1483310.0001
Sytem overhead
Fetch class attribute can translate value0.00130.096520.0007
Fetch class attribute name0.00120.083330.0004
XML
Image XML parsing0.00030.024220.0002
class_abstraction
Instantiating content class attribute0.00000.000830.0000
General
dbfile0.00090.0638100.0001
String conversion0.00000.000540.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/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: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs