book-all-books-block.html.twig

Default theme implementation 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.

    • book_id: The parent book ID.
    • menu: The top-level book links.

See also

template_preprocess()

template_preprocess_book_all_books_block()

1 theme call to book-all-books-block.html.twig
BookNavigationBlock::build in drupal/core/modules/book/lib/Drupal/book/Plugin/Block/BookNavigationBlock.php
Builds and returns the renderable array for this block plugin.

File

drupal/core/modules/book/templates/book-all-books-block.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for rendering book outlines within a block.
  5. *
  6. * This template is used only when the block is configured to "show block on all
  7. * pages", which presents multiple independent books on all pages.
  8. *
  9. * Available variables:
  10. * - book_menus: Book outlines.
  11. * - book_id: The parent book ID.
  12. * - menu: The top-level book links.
  13. *
  14. * @see template_preprocess()
  15. * @see template_preprocess_book_all_books_block()
  16. *
  17. * @ingroup themeable
  18. */
  19. #}
  20. {% for book_id, menu in book_menus %}
  21. <nav id="book-block-menu-{{ book_id }}" class="book-block-menu">
  22. {{ menu }}
  23. </nav>
  24. {% endfor %}

Related topics