You are here

faqfield-jquery-accordion-formatter.html.twig in FAQ Field 2.0.x

Same filename and directory in other branches
  1. 8 templates/faqfield-jquery-accordion-formatter.html.twig

Default theme implementation of a FAQ Field accordion formatter.

Available variables:

  • items: An array of objects with the following fields.

    • question: Prefiltered question value by check_plain.
    • answer: Prefiltered answer value by field setting format.
  • id: Id to wrap the accordion markup in.

File

templates/faqfield-jquery-accordion-formatter.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation of a FAQ Field accordion formatter.
  5. *
  6. * Available variables:
  7. * - items: An array of objects with the following fields.
  8. * - question: Prefiltered question value by check_plain.
  9. * - answer: Prefiltered answer value by field setting format.
  10. * - id: Id to wrap the accordion markup in.
  11. *
  12. * @see template_preprocess()
  13. * @see template_preprocess_faqfield_jquery_accordion_formatter()
  14. *
  15. * @ingroup themeable
  16. */
  17. #}
  18. {% spaceless %}
  19. <div id="{{ id }}">
  20. {% for item in items %}
  21. <h3 class="faqfield-question">{{ item.question }}</h3>
  22. <div class="faqfield-answer">{{ item.answer }}</div>
  23. {% endfor %}
  24. </div>
  25. {% endspaceless %}