| Saturday 19 March 2005 9:23:23 am 
                                                                
                                                                 Hello ! 
Firstly excuse my poor english, i'm french ;)So this is my code :
 
{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($nous,$Child:item.object.data_map.partie_scorenous.content)}
{set eux=sum($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> {$nous} -{$eux}  </td><tr>
</table>
</p>
{/let}
It succesfully displays an HTML array of matches and scores like that :Match | Scores
 match1 | <b>1</b>-0
 match2 | 3-2
 etc.
 Each part of the score is an integer.
 This line :
 {node_view_gui view=line content_node=$Child:item}
 shows a score (eg 1-0)This code :
 $Child:item.object.data_map.partie_scorenous.content can access to a part of the score ( eg in bold in the above array : 1 ) My problem is to display the final result of the array : <tr><td>Total :</td><td> {$nous} -{$eux}  </td><tr>using these lines to calculate the sum of each side of the score : {set nous=sum($nous,$Child:item.object.data_map.partie_scorenous.content)}
{set eux=sum($eux,$Child:item.object.data_map.partie_scoreadv.content)}
But it doesn't work ...What is wrong ?
 Thanks...
 |