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

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

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

      <?php foreach ($category['items'] as $faq): ?>
        <div 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): ?>
              <div 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): ?>
                  <div class="caption"><?= $faq->caption ?></div>
                <?php endif; ?>

              </div>
            <?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><?= Image::getHtml($enclosure['icon'], '', '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>
        </div>
      <?php endforeach; ?>

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

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