Forums / Setup & design / If exist / Comment19981

Author Topic

Nabil Alimi

Tuesday 13 September 2005 6:07:13 am

Comment19981

Well a loop... :)

Of course it can work but you need to apply the right syntax.

I recommend to use the <b>foreach</b> statement instead of <b>section loop</b> but it works also with section loop.

You can do this for example :
{section <b>var=test</b> loop=fetch( content,
list,
hash( parent_node_id, $node.node_id,
offset, $view_parameters.offset,
sort_by, $node.sort_array,
limit, 8) ) }

<i>And here you apply the test</i>

{if $test.data_map.IM.has_content}
{attribute_view_gui=$test.data_map.IM}
{else}
Your standard image
{/if}

{/section}

Something like this sould work.

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr