
<ul class="cols_<?= $this->perRow ?>">
  <?php foreach ($this->body as $class=>$row): ?>
    <?php foreach ($row as $col): ?>
      <?php if ($col->addImage): ?>
        <li class="<?= $class ?> <?= $col->class ?>">
          <div class="image_container"<?php if ($col->margin): ?> style="<?= $col->margin ?>"<?php endif; ?>>
            <?php if ($col->href): ?>
              <a href="<?= $col->href ?>"<?= $col->attributes ?> title="<?= $col->alt ?>"><?php $this->insert('picture_default', $col->picture); ?></a>
            <?php else: ?>
              <?php $this->insert('picture_default', $col->picture); ?>
            <?php endif; ?>
            <?php if ($col->caption): ?>
              <div class="caption"><?= $col->caption ?></div>
            <?php endif; ?>
          </div>
        </li>
      <?php endif; ?>
    <?php endforeach; ?>
  <?php endforeach; ?>
</ul>
