• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

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


Active member

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" />

but it does not work.

What is the correct code to select the value ?

Many thanks