Accordéon

Documentation du tag

Returns an accordion item. Takes a dict as parameter, with the following structure:

data_dict = {
    "id": "Unique id of the accordion item",
    "title": "Title of the accordion item",
    "content": "Content of the accordion item (can include html)",
    "heading_tag": "(Optional) Heading tag for the accordion title (default: h3)"
}

All of the keys of the dict can be passed directly as named parameters of the tag.

Can be used alone or in a group with the tag dsfr_accordion_group.

Tag name: dsfr_accordion

Usage: {% dsfr_accordion data_dict %}

Exemples

Données

{'content': '

Contenu d’exemple avec du gras et de ' 'l’italique

', 'id': 'sample-accordion', 'title': 'Titre de l’objet accordéon'}

Résultat

Contenu d’exemple avec du gras et de l’italique