man könnte es auch mit einem modifizierten template versuchen, z.b.
my_gallery_default.html5
Code:
<?php
function clean($x)
{
$y = explode(".",$x);
$z = ".".$y[count($y)-1];
return basename($x,$z);
}
?>
<ul>
<?php foreach ($this->body as $class=>$row): ?>
<?php foreach ($row as $col): ?>
<?php if ($col->addImage): ?>
<li class="<?php echo $class; ?> <?php echo $col->class; ?>">
<figure 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 clean($col->alt); ?>"><img src="<?php echo $col->src; ?>"<?php echo $col->imgSize; ?> alt="<?php echo clean($col->alt); ?>"></a>
<?php else: ?>
<img src="<?php echo $col->src; ?>"<?php echo $col->imgSize; ?> alt="<?php echo clean($col->alt); ?>">
<?php endif; ?>
<?php if ($col->caption): ?>
<figcaption class="caption" style="width:<?php echo $col->arrSize[0]; ?>px"><?php echo $col->caption; ?></figcaption>
<?php endif; ?>
</figure>
</li>
<?php endif; ?>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
geht bestimmt einfacher und eleganter, aber bis sich ein profi meldet, sollte es gehen
Lesezeichen