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

It will check if the mediafile is a video 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:IfText> < img src="textillustration.jpg" /> {$media_htmlmessage} <fm:Else> <!-- no text :( --> </fm:Else> </fm:IfVudio>

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}" /> </fm:Image> <fm:IfVideo> <!-- video player widget --> </fm:IfVideo> <fm:IfText> {$media_htmlmessage} </fm:IfText>

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