X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fbook%2Ftemplates%2Fbook-tree.html.twig;fp=web%2Fcore%2Fmodules%2Fbook%2Ftemplates%2Fbook-tree.html.twig;h=bf7424f4ef3c6d36cc6ab00e8eecc9e4d28a5ed4;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/web/core/modules/book/templates/book-tree.html.twig b/web/core/modules/book/templates/book-tree.html.twig new file mode 100644 index 000000000..bf7424f4e --- /dev/null +++ b/web/core/modules/book/templates/book-tree.html.twig @@ -0,0 +1,49 @@ +{# +/** + * @file + * Default theme implementation 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. + * - is_expanded: TRUE if the link has visible children within the current + * book tree. + * - is_collapsed: TRUE if the link has children within the current book tree + * that are not currently visible. + * - in_active_trail: TRUE if the link is in the active trail. + * + * @ingroup themeable + */ +#} +{% 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 %}