{% macro render_toc(event, days, config) %} {% trans %}Table of contents{% endtrans %} {% for day, entries in days.items() %} {{ day|format_skeleton('EEEEdMMM') }} {% if config.show_session_toc %} {% for entry in entries %} {% set can_render_item = ( entry.type.name == 'SESSION_BLOCK' or (entry.type.name == 'CONTRIBUTION' and config.show_contribs) or (entry.type.name == 'BREAK' and config.show_breaks) )%} {% if can_render_item %} {{ _render_toc_item(entry) }} {% endif %} {% endfor %} {% endif %} {% endfor %} {% endmacro %} {% macro _render_toc_item(entry) %}