XF 1.5 How to display image depending on media custom field value

marremp2

Active member
Hello,

I am trying to display an image in media_view template, depending on the value set by user in media custom field.
It is a select field (auteur_video), with two values "yes" or "no".

I tried this :

<xen:if is="{$media.customFields.auteur_video} == 'yes'">
<img src="/path/to/image.png" />
</xen:if>

but it does not work.

What is the correct code to select the value ?

Many thanks

Marina
 
Back
Top Bottom