ajouter_class

  • New in : 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 : 02/07/23

Translations : English, français