You are here

faq-ask-unanswered.html.twig in FAQ_Ask 8

Template file for the FAQ page if set to show/hide categorized answers when the question is clicked.

File

templates/faq-ask-unanswered.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Template file for the FAQ page if set to show/hide categorized answers when
  5. * the question is clicked.
  6. */
  7. /**
  8. * Available variables:
  9. *
  10. * $header_title
  11. * The category title.
  12. * $description
  13. * The current page's description.
  14. * $term_image
  15. * The HTML for the category image. This is empty if the taxonomy image module
  16. * is not enabled or there is no image associated with the term.
  17. * $display_faq_count
  18. * Boolean value controlling whether or not the number of faqs in a category
  19. * should be displayed.
  20. * $nodes
  21. * An array of nodes to be displayed.
  22. * Each node stored in the $nodes array has the following information:
  23. * $node['question'] is the question text.
  24. * $node['body'] is the answer text.
  25. * $node['links'] represents the node links, e.g. "Read more".
  26. * $use_teaser
  27. * Whether $node['body'] contains the full body or just the teaser text.
  28. * $container_class
  29. * The class attribute of the element containing the sub-categories, either
  30. * 'faq-qa' or 'faq-qa-hide'. This is used by javascript to open/hide
  31. * a category's faqs.
  32. */
  33. #}
  34. <div class="faq-category-group">
  35. <!-- category header with title, link, image, description, and count of
  36. questions inside -->
  37. <div class="faq-qa-header">
  38. <h2 class="faq-header">
  39. {{ term_image }}
  40. {{ header_title }}
  41. ( {{ question_count }} )
  42. </h2>
  43. {% if description is not empty %}
  44. <div class="faq-qa-description">{{ description }}</div>
  45. {% endif %}
  46. {% if term_image is not empty %}
  47. <div class="clear-block"></div>
  48. {% endif %}
  49. </div> <!-- Close div: faq-qa-header -->
  50. <!-- list questions (in title link) and answers (in body) -->
  51. <div class="faq-dl-hide-answer">
  52. {% if nodes > 0 %}
  53. {% for node in nodes %}
  54. <div class="faq-question-answer">
  55. <div class="faq-question faq-dt-hide-answer">
  56. {{ node['question'] }}
  57. {% for links in node['links'] %}
  58. <a href="{{ links['href'] }}"> {{ links['title'] }}</a>
  59. {% endfor %}
  60. </div> <!-- Close div: faq-question faq-dt-hide-answer -->
  61. </div> <!-- Close div: faq-question-answer -->
  62. {% endfor %}
  63. {% endif %}
  64. </div> <!-- Close div: faq-dl-hide-answer -->
  65. </div> <!-- Close div: faq-category-group -->