Working with Media

NAV IS OUTPUT

You can output an image by using the publish helper like:

{{{publish element="Media Element"}}}

This will output the media using the standard media layout.

If you need to output media with an alternate Media Layout you can do so using a combination of the media Helper and the mediaId Helper like so:

{{{media id=(mediaId element="Media Element") layout="image/alternative"}}}

The above example uses the mediaId Helper to get the Id of the Image from the element named "Media Element" and then passes it to the media Helper which outputs it with an alternate layout.

Example 1

{{{publish element="Media Element"}}}

A cat running through grass

Example 2

{{{media id=(mediaId element="Media Element") layout="image/figure"}}}

A cat running through grass

Example 3

{{{media id=(mediaId element="Media Element") layout="path/*"}}}

/media/sample-site/content-assets/global-content-assets/images/cat-image.jpg