Ich habe es jetzt so gelöst, völlig ausreichend, da es alle 2 Jahre nur Verwendung findet (und zudem im internen Bereich ist)...
HTML-Code:
<ul class="cols_<?= $this->perRow ?>" itemscope itemtype="http://schema.org/ImageGallery">
<?php foreach ($this->body as $class => $row): ?>
<?php foreach ($row as $col): ?>
<?php if ($col->addImage): ?>
<li class="<?= $class ?> <?= $col->class ?>">
<figure class="image_container"<?php if ($col->margin): ?> style="<?= $col->margin ?>"<?php endif; ?>>
<?php if ($col->href): ?>
<a href="<?= $col->href ?>"<?= $col->attributes ?><?php if ($col->linkTitle): ?> title="<?= $col->linkTitle ?>"<?php endif; ?>><?php $this->insert('picture_default', $col->picture); ?></a>
<?php
$file = \Input::get('file', true);
$myFile = \FilesModel::findByPath($file);
// Send the file to the browser and do not send a 404 header (see #4632)
if ($file != '' && null !== $myFile) {
$allowedDownload = trimsplit(',', strtolower(\Config::get('allowedDownload')));
if (in_array($myFile->extension, $allowedDownload)) {
\Controller::sendFileToBrowser($file);
}
}
?>
<figcaption class="caption">
<a href="/?file=<?= $col->singleSRC; ?>" title="Datei herunterladen"><?= $col->alt; ?></a>
</figcaption>
<?php endif; ?>
</figure>
</li>
<?php endif; ?>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
ToM
Edith sagt: hier die Lösung!
Lesezeichen