Hallo,
habe mir das "mm_attr_file.html5" etwas angepasst um Bilder (max. 6) ausgeben zu lassen.
Jetzt würde ich gerne das ganze soweit erweitern, dass wenn weniger als 6 Bilder vorhanden sind automatisch Platzhalter-Bilder eingesetzt werden. So dass immer 6 Bilder angezeigt werden.
Danke für eure Hilfe.
Das ist mein aktueller Code:
PHP-Code:
<?php if (is_array($this->src)): ?>
<ul>
<?php
$i = 0;
foreach($this->src as $arrFile) { ?>
<li class="<?php echo $arrFile['class']; ?>">
<?php if ($this->settings->get('file_showLink')): ?>
<?php if ($this->settings->get('file_showImage')): ?>
<a data-lightbox="<?php echo $arrFile['lb']; ?>" title="<?php echo $arrFile['alt']; ?>" href="<?php echo $arrFile['file']; ?>">
<?php else: ?>
<a title="<?php echo $arrFile['alt']; ?>" href="<?php echo $arrFile['url']; ?>">
<?php endif; ?>
<?php endif; ?>
<?php if ($this->settings->get('file_showImage')): ?>
<?php if ($arrFile['isGdImage']): ?>
<?php echo $this->generateImage($arrFile['src'], $arrFile['caption']); ?>
<?php endif; ?>
<?php else: ?>
<img src="<?php echo $arrFile['icon']; ?>" alt="" /> <?php echo $arrFile['alt'] ? $arrFile['alt'] : $arrFile['file']; ?> <span class="size"><?php echo $arrFile['sizetext']; ?></span>
<?php endif; ?>
<?php if ($this->settings->get('file_showLink')): ?>
</a>
<?php endif; ?>
</li>
<?php
$i++;
if ( $i >= 6) break;
} ?>
</ul>
<?php endif; ?>
Lesezeichen