Sommaire

Documentation du tag

Returns a summary item. Takes a list as parameter, with the following structure:

items = [
    { "link": "item1", "label": "First item label"},
    { "link": "item2", "label": "Second item label", "children": [
        { "link": "item2-1", "label": "First nested item label"},
        { "link": "item2-2", "label": "Second nested item label"},
        ]},
    {...}
]

Also takes an optional "heading_tag" parameter, which can be "p" (default) or h2>h6.

Tag name: village_summary

Usage: {% village_summary items heading_tag %}

Exemples

Données

[{'label': 'Titre du premier élément', 'link': '#'},
 {'label': 'Titre du second élément', 'link': '#'}]

Résultat

Données

[{'label': 'Titre du premier élément', 'link': '#'},
 {'children': [{'label': 'Titre du premier élément imbriqué', 'link': '#'},
               {'children': [{'label': 'Titre du premier élément imbriqué '
                                       '(niveau inférieur)',
                              'link': '#'},
                             {'label': 'Titre du second élément imbriqué '
                                       '(niveau inférieur)',
                              'link': '#'}],
                'label': 'Titre du second élément imbriqué',
                'link': '#'}],
  'label': 'Titre du second élément',
  'link': '#'}]

Résultat