{% macro get_if_exists(path, type="text") %} {% set pages_str = people.pages | json_encode() | as_str %} {% if pages_str is containing(person.name) %} {% set page = get_page(path=page_path) %} {% endif %} {{ page }} {% endmacro get_if_exists %} {% macro page_list(type="text") %}
{% if section.extra.group_pages_by %}
{% set taxonomy = get_taxonomy(kind=section.extra.group_pages_by) %} {% set roles = taxonomy.items %} {% for role in roles %}
{% set icon_path = config.extra.taxonomies["roles"][role.name].icon_path | as_str %} role category icon {% set path = role.name | slugify %} {% set fullpath = "/roles/" ~ path %} {{role.name}} {% for page in role.pages %} {% include "partials/pageBox.html"%} {% endfor %}
{% endfor %}
{% else %} {% for page in section.pages %} {{page}} {% include "partials/pageBox.html"%} {% endfor %} {% endif %} {% endmacro page_list %}