Files
website/templates/thumb.phtml

44 lines
983 B
PHTML

<?php
$registry = \Helper\Registry::getInstance();
$imagePath = $registry->editorConfig['mediaPrefix'] . $registry->navID . '/';
$images = json_decode($this->data['thumbImages']);
$headlines = json_decode($this->data['thumbHeadlines']);
$texts = json_decode($this->data['thumbTexts']);
$editorData = '';
if ($this->isEditable === true)
{
$editorData = ' data-editor="Thumb" data-id="' . $this->data['thumbID'] . '" data-element="Thumb_' . $this->data['thumbID'] . '"';
}
?>
<div class="row thumbPage"<?php echo $editorData; ?>>
<?php
foreach ($images as $key => $image)
{
?>
<div class="col-xs-6 col-md-3">
<div class="thumbnail">
<img src="<?php echo $imagePath . $image; ?>"/>
<div class="caption">
<p><b><?php echo $headlines[$key]; ?></b></p>
<?php
if (isset($texts[$key]))
{
?>
<p><?php echo $texts[$key]; ?></p>
<?php
}
?>
</div>
</div>
</div>
<?php
}
?>
</div>
<div class="row">&nbsp;</div>