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

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

  <?php if ($this->error): ?>
    <?= $this->error ?>
  <?php else: ?>
    <h1><?= $this->question ?></h1>
    <div class="ce_text block">

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

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

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

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

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

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

        </figure>
      <?php endif; ?>

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

    </div>

    <?php if ($this->enclosure): ?>
      <div class="enclosure">
        <?php foreach ($this->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"><?= $this->info ?></p>

    <!-- indexer::stop -->
    <p class="back"><a href="<?= $this->referer ?>" title="<?= $this->back ?>"><?= $this->back ?></a></p>
    <!-- indexer::continue -->
  <?php endif; ?>

  <?php if ($this->allowComments): ?>
    <div class="ce_comments block">
      <<?= $this->hlc ?>><?= $this->addComment ?></<?= $this->hlc ?>>
      <?= implode('', $this->comments) ?>
      <?= $this->pagination ?>
      <?php include $this->getTemplate('mod_comment_form', 'html5'); ?>
    </div>
  <?php endif; ?>

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