Share » Forums » Setup & design » Adding code in article.tp

Adding code in article.tp

Adding code in article.tp

Saturday 06 May 2006 6:56:34 am - 2 replies

Author Message

Pascal France

Saturday 06 May 2006 8:15:40 am

Hi,

I found a dirty solution:

 1 {def
 2    $nodes1=fetch( 'content', 'list', hash( 'parent_node_id', $node.node_id, 'sort_by', array(array('priority', true())) ) )
 3 $aaa=$node
 ""
 ""
 ""
 19 {undef}
 

...and then I replace all "$node" instances in the template by "$aaa"

But I think there is a clean solution.

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Pascal France

Sunday 07 May 2006 3:17:26 am

Hi,

A more easy solution is:

 1 {def
 2   $nodes1=fetch( 'content', 'list', hash( 'parent_node_id', $node.node_id, 'sort_by', array(array('priority', true())) ) )
 3 $aaa=$node
 ""
 ""
 ""
 19 {undef}
 20 {def $node=$aaa}

Like that, I needn't to replace all $node instances.

But I really don't understand why I have to do that.

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu