Media Tags
All tags described here must be used into the <ion:medias /> iterator tag.
medias
Iterator tags for medias.
<ion:medias type="picture/video/music/file" [ limit="3" range="2,3"] >
<!-- Display pictures -->
<img src="<ion:src [folder="small"] />" alt="<ion:alt />" title="<ion:title /> | <ion:copyright />" />
<!-- Display files with link to the file and description -->
<p>
<a href="<ion:link />" title="<ion:title />"><ion:title /></a>
<span>
<ion:description />
</span>
</p>
</ion:medias>
| Attribute | Optional | Values |
|---|---|---|
| type | no | picture, video, music, file |
| extension | yes | The file extension to filter on. Example : extension="pdf" |
| limit | yes | Integer. Limits the displayed media to the given number. |
| range | yes | Start and stop index, coma separated. Start at 0.< br/> Example : range="1,3" displays the medias from the second one to the fourth one. |
src
Returns the path to the media.
<ion:src [ folder="media_folder" ] />
| Attribute | Optional | Values |
|---|---|---|
| folder | yes | Can only be used with type="image". Returns the URL to the corresponding thumb folder. Thumbs folders must be declared in : Settings > Advanced Settings > New picture thumbnail. |
link
Returns the absolute URL to the media.
<ion:link [ tag="span" id="my_id" class="my_class" ] />
id_media
Returns the internal database media ID (integer value). Unique for each media.
<!-- Media ID --> <ion:id_media />
file_name
Returns the file name, with extension. Example : my_picture.jpg.
<!-- File name --> <ion:file_name [ tag="span" id="my_id" class="my_class" ] />
path
Returns the media complete path, excluding the base URL of your website, without first "/".
Example : files/pictures/sunrise/my_sunrise.jpg.
<!-- File path --> <ion:path />
base_path
Returns the media base path, excluding the base URL of your website, without first "/", with trailing "/"
Example : files/pictures/sunrise/.
<!-- Base path --> <ion:base_path />
alt, title, description, copyright
<!-- Alternative text --> <ion:alt [ tag="span" id="my_id" class="my_class" ] /> <!-- Media title --> <ion:title [ tag="span" id="my_id" class="my_class" ] /> <!-- Description --> <ion:description [ tag="span" id="my_id" class="my_class" ] /> <!-- Copyright --> <ion:copyright [ tag="span" id="my_id" class="my_class" ] />