faq-questions-inline.tpl.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. <?php // Cycle through the $nodes array so that we now have a $node variable to work with. ?>
  28. <br />
  29. <div class="faq-question">
  30. <?php if (!empty($question_label)): ?>
  31. <strong class="faq-question-label">
  32. <?php print $question_label; ?>
  33. </strong>
  34. <?php endif; ?>
  35. <?php print $node['question']; ?>
  36. </div> <!-- Close div: faq-question -->
  37. <div class="faq-answer">
  38. <?php if (!empty($answer_label)): ?>
  39. <strong class="faq-answer-label">
  40. <?php print $answer_label; ?>
  41. </strong>
  42. <?php endif; ?>
  43. <?php print $node['body']; ?>
  44. <?php if (isset($node['links'])): ?>
  45. <?php print $node['links']; ?>
  46. <?php endif; ?>
  47. </div> <!-- Close div: faq-answer -->
  48. <?php endforeach; ?>
  49. <?php endif; ?>
  50. </div> <!-- Close div -->