For example:
[(#LOGO_DOCUMENT||inserer_attribut{alt, #TITRE|attribut_html})]
modifies the "alt" attribute of the "img" HTML tag that is generated by the #LOGO_DOCUMENT tag by assigning it the document’s title as the value.
modifies the "alt" attribute of the "img" html tag generated by the #LOGO_DOCUMENT tag, assigning the document title as the value.
More precisely...
The filter is only applied to the first occurrence of an "attribute"; if no such occurrence is found, then it is applied to the first "tag" encountered.
So
[(#TEXTE|inserer_attribut{class, perso})]
...will modify the first "class" attribute encountered in #TEXTE and only that or, if no "class" attribute is present in #TEXTE, will create a class="perso"
in the first html tag present in #TEXTE (by default, in the opening <p>
).
See also
Filters