faq-8.x-1.0-alpha1/templates/faq-hide-answer.html.twig
templates/faq-hide-answer.html.twig
{#
/**
* @file
* Template file for the FAQ page if set to show/hide the answers when the
* question is clicked.
*
* Available variables:
* - nodes: The array of nodes to be displayed. Each node stored in the $nodes array has the following information:
* - question: The question text.
* - body: The answer text.
* - links: Represents the node links, e.g. "Read more".
* - use_teaser: Tells whether node.body contains the full body or just the teaser
*
* @see template_preprocess_faq_hide_answer()
*
* @ingroup themable
*/
#}
<div>
{% if nodes|length > 0 %}
{% for node in nodes %}
<div class="faq-question-answer">
<div class="faq-question faq-dt-hide-answer">
{{ node.question }}
</div><!-- Close div: faq-question faq-dt-hide-answer -->
<div class="faq-answer faq-dd-hide-answer">
{{ node.body }}
{% if node.links is defined %}
{{ node.links }}
{% endif %}
</div><!-- Close div: faq-answer faq-dd-hide-answer -->
</div><!-- Close div: faq-question-answer -->
{% endfor %}
{% endif %}
</div><!-- Close div -->
