Package

ViewHelpers

ViewHelper Documentation

media

Render a given media file with the correct html tag.

It asks the RendererRegister for the correct Renderer class and if not found it falls back to the ImageViewHelper as that is the "Renderer" class for images in Fluid context.

= Examples =

<f:media file="{file}" width="400" height="375" />

<img alt="alt set in image record" src="fileadmin/_processed_/323223424.png" width="396" height="375" />

<f:media file="{file}" width="400" height="375" />

<video width="400" height="375" controls><source src="fileadmin/user_upload/my-video.mp4" type="video/mp4"></video>

<f:media file="{file}" width="400" height="375" additionalConfig="{loop: '1', autoplay: '1'}" />

<video width="400" height="375" controls loop><source src="fileadmin/user_upload/my-video.mp4" type="video/mp4"></video>

Arguments

additionalAttributes anySimpleType

Additional tag attributes. They will be added directly to the resulting HTML tag.

data anySimpleType

Additional data-* attributes. They will each be added with a "data-" prefix.

file anySimpleType, required

additionalConfig anySimpleType

This array can hold additional configuration that is passed though to the Renderer object

width string

This can be a numeric value representing the fixed width of in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.

height string

This can be a numeric value representing the fixed height in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.

class string

CSS class(es) for this element

dir string

Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)

id string

Unique (in this file) identifier for this HTML element.

lang string

Language for this element. Use short names specified in RFC 1766

style string

Individual CSS styles for this element

title string

Tooltip text of element

accesskey string

Keyboard shortcut to access this element

tabindex integer

Specifies the tab order of this element

onclick string

JavaScript evaluated for the onclick event

alt string

Specifies an alternate text for an image

ViewHelper Resources

Schema Resources