{# /** * @file * Default theme implementation to display a Table of contents as a tree. * * Returns HTML for a nested list representation of a Table of contents.. * * Available variables: * - tree: A nested list of header items. Each header item contains: * - list_tag: HTML tag for the list. * - list_attributes: HTML attributes for the list. * - attributes: HTML attributes for the table of contents or list item. * - below: The table of contents child items. * - title: The table of contents or header title. * - url: The header fragrment (ie hash) URL, instance of \Drupal\Core\Url. * * @ingroup themeable */ #} {# We call a macro which calls itself to render the full tree. @see http://twig.sensiolabs.org/doc/tags/macro.html #} {% import _self as toc_api_tree %} {% set classes = ['toc', 'toc-tree'] %} {% if tree.title and not options.block %}

{{ tree.title }}

{% endif %} {{ toc_api_tree.tree_links(tree) }} {% macro tree_links(item) %} {% import _self as toc_api_tree %} {% if item.below_type %}
    {% else %}
{% else %} {% endif %} {% endmacro %}