{# /** * @file * Theme override to display a book tree. * * Returns HTML for a wrapper for a book sub-tree. * * Available variables: * - items: A nested list of book items. Each book item contains: * - attributes: HTML attributes for the book item. * - below: The book item child items. * - title: The book link title. * - url: The book link URL, instance of \Drupal\Core\Url. */ #} {% import _self as book_tree %} {# We call a macro which calls itself to render the full tree. @see http://twig.sensiolabs.org/doc/tags/macro.html #} {{ book_tree.book_links(items, attributes, 0) }} {% macro book_links(items, attributes, menu_level) %} {% import _self as book_tree %} {% if items %} {% if menu_level == 0 %} {% else %} {% endif %} {% endmacro %}