faq-questions-inline.tpl.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * @file
  4. * Template file for the FAQ page if set to show the questions inline.
  5. */
  6. /**
  7. * Available variables:
  8. *
  9. * $nodes
  10. * The array of nodes to be displayed.
  11. * Each node stored in the $nodes array has the following information:
  12. * $node['question'] is the question text.
  13. * $node['body'] is the answer text.
  14. * $node['links'] represents the node links, e.g. "Read more".
  15. * $question_label
  16. * The question label, intended to be pre-pended to the question text.
  17. * $answer_label
  18. * The answer label, intended to be pre-pended to the answer text.
  19. * $use_teaser
  20. * Tells whether $node['body'] contains the full body or just the teaser
  21. */
  22. ?>
  23. <a id="faq-top"></a>
  24. <div>
  25. <?php if (count($nodes)): ?>
  26. <?php foreach ($nodes as $node): ?>
  27. <br />
  28. <div class="faq-question">
  29. <?php if (!empty($question_label)): ?>
  30. <strong class="faq-question-label">
  31. <?php print $question_label; ?>
  32. </strong>
  33. <?php endif; ?>
  34. <?php print $node['question']; ?>
  35. </div> <!-- Close div: faq-question -->
  36. <div class="faq-answer">
  37. <?php if (!empty($answer_label)): ?>
  38. <strong class="faq-answer-label">
  39. <?php print $answer_label; ?>
  40. </strong>
  41. <?php endif; ?>
  42. <?php print $node['body']; ?>
  43. <?php if (isset($node['links'])): ?>
  44. <?php print $node['links']; ?>
  45. <?php endif; ?>
  46. </div> <!-- Close div: faq-answer -->
  47. <?php endforeach; ?>
  48. <?php endif; ?>
  49. </div> <!-- Close div -->