<?php $this->extend('block_unsearchable'); ?>

<?php $this->block('content'); ?>

  <?php foreach($this->faq as $category): ?>
    <article class="<?= $category['class'] ?>">
      <h2><?= $category['headline'] ?></h2>

      <?php foreach ($category['items'] as $faq): ?>
        <section class="<?= $faq->class ?>">
          <h3 id="<?= $faq->alias ?>"><?= $faq->question ?></h3>
          <div class="ce_text block">

            <?php if (!$faq->addBefore): ?>
              <?= $faq->answer ?>
            <?php endif; ?>

            <?php if ($faq->addImage): ?>
              <figure class="image_container<?= $faq->floatClass ?>"<?php if ($faq->margin): ?> style="<?= $faq->margin ?>"<?php endif; ?>>

                <?php if ($faq->href): ?>
                  <a href="<?= $faq->href ?>"<?= $faq->attributes ?> title="<?= $faq->alt ?>">
                <?php endif; ?>

                <?php $this->insert('picture_default', $faq->picture); ?>

                <?php if ($faq->href): ?>
                  </a>
                <?php endif; ?>

                <?php if ($faq->caption): ?>
                  <figcaption class="caption"><?= $faq->caption ?></figcaption>
                <?php endif; ?>

              </figure>
            <?php endif; ?>

            <?php if ($faq->addBefore): ?>
              <?= $faq->answer ?>
            <?php endif; ?>

          </div>

          <?php if ($faq->enclosure): ?>
            <div class="enclosure">
              <?php foreach ($faq->enclosure as $enclosure): ?>
                <p><img src="<?= $enclosure['icon'] ?>" width="18" height="18" alt="<?= $enclosure['mime'] ?>" class="mime_icon"> <a href="<?= $enclosure['href'] ?>" title="<?= $enclosure['title'] ?>"><?= $enclosure['link'] ?> <span class="size">(<?= $enclosure['filesize'] ?>)</span></a></p>
              <?php endforeach; ?>
            </div>
          <?php endif; ?>

          <p class="info"><?= $faq->info ?></p>
        </section>
      <?php endforeach; ?>

      <p class="toplink"><a href="<?= $this->request ?>#top"><?= $this->topLink ?></a></p>
    </article>
  <?php endforeach; ?>

<?php $this->endblock(); ?>
