SPIP

[ar] [ast] [bg] [br] [ca] [co] [cpf] [cs] [da] [de] [en] [eo] [es] [eu] [fa] [fon] [fr] [gl] [id] [it] [ja] [lb] [nl] [oc] [pl] [pt] [ro] [ru] [sk] [sv] [tr] [uk] [vi] [zh] Espace de traduction

Download

|env_to_params

July 2010 — updated on : June 2010

All the versions of this article:

Retrieves the parameters passed to an audio or video model, and creates the correspondences for the <object> HTML tag.


Used in a model template file within a DOCUMENTS loop or inside an HTML <object> tag, this filter, when specifically applied to the ENV tag: [(#ENV*|env_to_params)], will retrieve the parameters passed to that model: (<emb54|center|autoplay=true|loop=false>) and create the corresponding <param value="..." name="..." /> HTML tag for each of them.

Example:
Whereas a simple call to the model <video386> will produce by default:

<param value="IMG/mov/mon_film.mov" name="movie"/>
<param value="IMG/mov/mon_film.mov" name="src"/>
<param value="386" name="id_video"/>
<param value="" name="class"/>


a call with more arguments like

<video386
     |center
     |border=6
     |autostart=false
     |autoload=false
     |loop=3
     |controls=true>

would produce:

<param value="IMG/mov/mon_film.mov" name="movie"/>
<param value="IMG/mov/mon_film.mov" name="src"/>
<param value="386" name="id_video"/>
<param value="" name="class"/>
<param value="center" name="center"/>
<param value="6" name="border"/>
<param value="false" name="autostart"/>
<param value="false" name="autoload"/>
<param value="3" name="loop"/>
<param value="true" name="controls"/>

Show the template of this page Site powered by SPIP | Translation area | Private area