Saturday 04 June 2011 3:23:05 pm
Not exactly what you are looking for but it does use a break:
{if $this_node.data_map.image.content.is_valid}
{*has an image in the image attribute*}
<img src={$this_node.data_map.image.content.['medium'].url|ezroot} />
{elseif ne($this_node.object.related_contentobject_count,0)}
{foreach $this_node.object.related_contentobject_array as $related_object}
{if eq($related_object.class_identifier,"image")}
{*has an image as a related object*}
<img src={$related_object.data_map.image.content.['medium'].url|ezroot} />
{break}
{/if}
{/foreach}
{else}
{*got bubkis*}
<img src={"dummy.jpg"|ezimage}>
{/if}
Certified eZPublish developer
http://ez.no/certification/verify/396111
Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com
|