Version 1
[yaffs-website] / web / core / themes / stable / templates / navigation / book-all-books-block.html.twig
diff --git a/web/core/themes/stable/templates/navigation/book-all-books-block.html.twig b/web/core/themes/stable/templates/navigation/book-all-books-block.html.twig
new file mode 100644 (file)
index 0000000..2eafa8e
--- /dev/null
@@ -0,0 +1,22 @@
+{#
+/**
+ * @file
+ * Theme override for rendering book outlines within a block.
+ *
+ * This template is used only when the block is configured to "show block on all
+ * pages", which presents multiple independent books on all pages.
+ *
+ * Available variables:
+ * - book_menus: Book outlines.
+ *   - id: The parent book ID.
+ *   - title: The parent book title.
+ *   - menu: The top-level book links.
+ *
+ * @see template_preprocess_book_all_books_block()
+ */
+#}
+{% for book in book_menus %}
+  <nav role="navigation" aria-label="{% trans %}Book outline for {{ book.title }}{% endtrans %}">
+    {{ book.menu }}
+  </nav>
+{% endfor %}