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.