book-export-html.html.twig

Same filename in this branch
  1. 11.x core/profiles/demo_umami/themes/umami/templates/classy/layout/book-export-html.html.twig
  2. 11.x core/themes/olivero/templates/layout/book-export-html.html.twig
  3. 11.x core/themes/claro/templates/classy/layout/book-export-html.html.twig
  4. 11.x core/modules/book/templates/book-export-html.html.twig
Same filename in other branches
  1. 9 core/profiles/demo_umami/themes/umami/templates/classy/layout/book-export-html.html.twig
  2. 9 core/themes/olivero/templates/layout/book-export-html.html.twig
  3. 9 core/themes/stable9/templates/layout/book-export-html.html.twig
  4. 9 core/themes/seven/templates/classy/layout/book-export-html.html.twig
  5. 9 core/themes/claro/templates/classy/layout/book-export-html.html.twig
  6. 9 core/themes/bartik/templates/classy/layout/book-export-html.html.twig
  7. 9 core/themes/stable/templates/layout/book-export-html.html.twig
  8. 9 core/themes/classy/templates/layout/book-export-html.html.twig
  9. 9 core/modules/book/templates/book-export-html.html.twig
  10. 8.9.x core/profiles/demo_umami/themes/umami/templates/classy/layout/book-export-html.html.twig
  11. 8.9.x core/themes/seven/templates/classy/layout/book-export-html.html.twig
  12. 8.9.x core/themes/claro/templates/classy/layout/book-export-html.html.twig
  13. 8.9.x core/themes/bartik/templates/classy/layout/book-export-html.html.twig
  14. 8.9.x core/themes/stable/templates/layout/book-export-html.html.twig
  15. 8.9.x core/themes/classy/templates/layout/book-export-html.html.twig
  16. 8.9.x core/modules/book/templates/book-export-html.html.twig
  17. 10 core/profiles/demo_umami/themes/umami/templates/classy/layout/book-export-html.html.twig
  18. 10 core/themes/olivero/templates/layout/book-export-html.html.twig
  19. 10 core/themes/stable9/templates/layout/book-export-html.html.twig
  20. 10 core/themes/claro/templates/classy/layout/book-export-html.html.twig
  21. 10 core/modules/book/templates/book-export-html.html.twig

Theme override for printed version of book outline.

Available variables:

  • title: Top level node title.
  • head: Header tags.
  • language: Language object.
  • language_rtl: A flag indicating whether the current display language is a right to left language.
  • base_url: URL to the home page.
  • contents: Nodes within the current outline rendered through book-node-export-html.html.twig.

See also

template_preprocess_book_export_html()

1 theme call to book-export-html.html.twig
BookExport::bookExportHtml in core/modules/book/src/BookExport.php
Generates HTML for export when invoked by book_export().

File

core/themes/stable9/templates/layout/book-export-html.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for printed version of book outline.
  5. *
  6. * Available variables:
  7. * - title: Top level node title.
  8. * - head: Header tags.
  9. * - language: Language object.
  10. * - language_rtl: A flag indicating whether the current display language is a
  11. * right to left language.
  12. * - base_url: URL to the home page.
  13. * - contents: Nodes within the current outline rendered through
  14. * book-node-export-html.html.twig.
  15. *
  16. * @see template_preprocess_book_export_html()
  17. */
  18. #}
  19. <!DOCTYPE html>
  20. <html{{ html_attributes }}>
  21. <head>
  22. <title>{{ title }}</title>
  23. {{ page.head }}
  24. <base href="{{ base_url }}" />
  25. <link type="text/css" rel="stylesheet" href="/core/themes/stable9/css/core/print.css" />
  26. </head>
  27. <body>
  28. {#
  29. The given node is embedded to its absolute depth in a top level section.
  30. For example, a child node with depth 2 in the hierarchy is contained in
  31. (otherwise empty) div elements corresponding to depth 0 and depth 1. This
  32. is intended to support WYSIWYG output - e.g., level 3 sections always look
  33. like level 3 sections, no matter their depth relative to the node selected
  34. to be exported as printer-friendly HTML.
  35. #}
  36. {% if depth > 1 %}{% for i in 1..depth - 1 %}
  37. <div>
  38. {% endfor %}{% endif %}
  39. {{ contents }}
  40. {% if depth > 1 %}{% for i in 1..depth - 1 %}
  41. </div>
  42. {% endfor %}{% endif %}
  43. </body>
  44. </html>

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.