Grid Akademie > Templates für Contao 2.9 > gallery_default.tpl ohne HTML-Table-Tag

gallery_default.tpl Anpassungen

Hier der Quelltext vom geändertem Template "gallery_default.tpl", hier als "gallery_div.tpl" abgelegt. Siehe dazu die Hinweise auf der Galerie Seite.

<?php foreach ($this->body as $class=>$row): ?>
<?php foreach ($row as $col): ?>
<?php if (!$col->addImage): ?>
  <div class="<?php echo $col->class; ?> empty">&nbsp;</div>
<?php else: ?>
  <div class="<?php echo $col->class; ?>" style="float:left;">
  <div class="image_container"<?php if ($col->margin): ?> style="<?php echo $col->margin; ?>"<?php endif; ?>>
<?php if ($col->href): ?>
    <a href="<?php echo $col->href; ?>"<?php echo $col->attributes; ?> title="<?php echo $col->alt; ?>"><img src="<?php echo $col->src; ?>"<?php echo $col->imgSize; ?> alt="<?php echo $col->alt; ?>" /></a>
<?php else: ?>
    <img src="<?php echo $col->src; ?>"<?php echo $col->imgSize; ?> alt="<?php echo $col->alt; ?>" />
<?php endif; ?>
<?php if ($col->caption): ?>
    <div class="caption"><?php echo $col->caption; ?></div>
<?php endif; ?>
  </div>
  </div>
<?php endif; ?>
<?php endforeach; ?>
<div style="clear:left;" class="empty">&nbsp;</div>
<?php endforeach; ?>