Tuesday 13 January 2004 4:26:34 am
Hi I am using the new is_valid template operator. But I am having difficulties in using it.
It get this to work:
{let content=$node.data_map.image.content}
{section show=$content.is_valid}
We have an image.
{section-else}
No image has been uploaded.
{/section} {/let}
But this does not work (using within an section loop going through several children):
{let content=$Child:item.data_map.thumbnail.content}
{section show=$content.is_valid}
IMAGE
<div class="image_left">{attribute_view_gui attribute=$Child:item.data_map.thumbnail image_class=small}</div>
{section-else}
NO IMAGE
{/section} {/let} In the above the {section-else} is never true, even if there is not an image.
Neither does this work (dropped the "let"):
{section show=$node.data_map.thumbnail.content.is_valid}
We have an image.
{section-else}
No image has been uploaded. {/section} This causes an fatal error. So now I am wondring if anyone else have experinced this, or am I using it wrong?
Cheers Tore
|