|ajouter_class

  • New in : SPIP 4.0

Available since SPIP 4.0, the|ajouter_class filter adds a class or classes to an HTML tag.

Example

[(#CHEMIN{img/logo.svg)|balise_img|ajouter_class{nav logo-site})]

looks for the img/logo.svg file and generates the image tag with the nav and logo-site classes.

This produces the following HTML:

<img src='squelettes/img/logo.svg?1579179279' alt='' width='200' height='200' class=' nav logo-site' />

See also

Author jack Published : Updated : 30/08/21

Translations : English, français