Forums / Setup & design / Set a condition on the value of an attribute
M M
Tuesday 10 May 2005 8:43:57 am
Hi all
Please I need your help in the folloewing problem...
I need to make a condition on the existance of a value in an attribute
* when there is no content in this attribute, Display image 1
* when there is content in this attribute, Display image 2
Now I'm using the following code but it do nothing
{Section show=$parent.object.data_map.site_image.content.is_empty|not}
{attribute_view_gui attribute=$parent.object.data_map.site_image}
{Section-else}
{attribute_view_gui attribute=$grand.data_map.site_image}
{/section}
where the variables grand and parent are pre defined
and site_image is the attribute's identifier
Thanks in advance
Mads Ovesen
Wednesday 11 May 2005 2:33:53 am
Try:
{section show=$parent.object.data_map.site_image.content} {attribute_view_gui attribute=$parent.object.data_map.site_image.content.data_map.image} {section-else} {attribute_view_gui attribute=$grand.object.data_map.site_image.content.data_map.image} {/section}
- Mads
/m