You are here

faq-page.html.twig in Frequently Asked Questions 8

Template file for wrapping FAQ pages

Available variables:

  • description: Rendered description of the FAQ-page.
  • content: Rendered content.
  • answers: Rendered answers.
  • faq_expand: True or false, depends on

'Show "expand / collapse all" links for collapsed questions' setting.

File

templates/faq-page.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Template file for wrapping FAQ pages
  5. *
  6. * Available variables:
  7. * - description: Rendered description of the FAQ-page.
  8. * - content: Rendered content.
  9. * - answers: Rendered answers.
  10. * - faq_expand: True or false, depends on
  11. * 'Show "expand / collapse all" links for collapsed questions' setting.
  12. *
  13. * @see template_preprocess_faq_page()
  14. *
  15. * @ingroup themable
  16. */
  17. #}
  18. <div class="faq-content">
  19. <div class="faq">
  20. {% if description is not empty %}
  21. <div class="faq-description">
  22. {{ description }}
  23. </div>
  24. {% endif %}
  25. {% if faq_expand %}
  26. <div id="faq-expand-all">
  27. <a class="faq-expand-all-link" href="#faq-expand-all-link">[{{ 'expand all'|t }}]</a>
  28. <a class="faq-collapse-all-link" href="#faq-collapse-all-link">[{{ 'collapse all'|t }}]</a>
  29. </div>
  30. {% endif %}
  31. {{ content }}
  32. {{ answers }}
  33. </div>
  34. </div>