Łukasz Serwatka
|
Sunday 20 March 2005 11:03:47 pm
Hi Pierre, This was a namespace problem. I recommend to use var= instead of name= in sections. Example with var=
{let page_limit=20
children=fetch('content','list',hash(parent_node_id,$node.node_id,sort_by,$node.sort_array,limit,$page_limit,offset,$view_parameters.offset)) list_count=fetch('content','list_count',hash(parent_node_id,$node.node_id))
nous=0
eux=0}
<p>
<table>
<th>Map</th><th>Score</th>
{section var=Child loop=$children sequence=array(bglight,bgdark)}
<tr>
{set nous=sum($nous,$Child.object.data_map.partie_scorenous.content)}
{set eux=sum($eux,$Child.object.data_map.partie_scoreadv.content)}
{node_view_gui view=line content_node=$Child}
</tr>
{/section}
<tr><td>Total :</td><td> {$nous} -{$eux} </td><tr>
</table>
</p>
{/let}
Example with name=
{let page_limit=20
children=fetch('content','list',hash(parent_node_id,$node.node_id,sort_by,$node.sort_array,limit,$page_limit,offset,$view_parameters.offset)) list_count=fetch('content','list_count',hash(parent_node_id,$node.node_id))
nous=0
eux=0}
<p>
<table>
<th>Map</th><th>Score</th>
{section name=Child loop=$children sequence=array(bglight,bgdark)}
<tr>
{set nous=sum($Child:nous,$Child:item.object.data_map.partie_scorenous.content)}
{set eux=sum($Child:eux,$Child:item.object.data_map.partie_scoreadv.content)}
{node_view_gui view=line content_node=$Child:item}
</tr>
{/section}
<tr><td>Total :</td><td> {$Child:nous} -{$Child:eux} </td><tr>
</table>
</p>
{/let}
I hope it will help.
Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog
|