This component can be used within a Mediadetail page, or the MediaList (Loop) component.

It will check if the mediafile is an audio file, and if so, will render the content within it's tags.

Because this component extends the behavior of the fm:If component, you can include an fm:Else component, should you need to.

This component does not generate template variables, but can pass on variables that exist in parent components (such as {$media_title} )


<fm:IfImage> <img src="{$media_publicUrl}/15"> <fm:Else> <!-- nothing to see :( --> </fm:Else> </fm:IfImage>

However, a more useful template would look like this:

<fm:IfAudio> <!-- music player widget goes here --> </fm:IfAudio> <fm:Image> <img src="{$media_publicUrl}/15" alt="{$media_title}" alt="{$media_title}"/> </fm:Image> <fm:IfVideo> <!-- video player widget --> </fm:IfVideo>

Supported attributes

This component does not process attributes.

Template variables

This component does not generate template variables, it will render template variables defined in parent components.

See also