Skip to content

Commit

Permalink
Fixed title attributes for image-only sliders, fixes #48
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed Aug 29, 2017
1 parent 6d0b99f commit d515242
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Resources/contao/templates/rsts_default.html5
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
?>

<?php if ($loadLazy): ?>
<script type="text/html"<?php if ($image->alt): ?> data-rsts-name="<?= $image->alt ?>"<?php endif ?><?php if (!empty($image->thumb->src)): ?> data-rsts-thumb="<?= $image->thumb->src ?>"<?php endif ?>>
<script type="text/html"<?php if ($image->picture['alt']): ?> data-rsts-name="<?= $image->picture['alt'] ?>"<?php endif ?><?php if (!empty($image->thumb->src)): ?> data-rsts-thumb="<?= $image->thumb->src ?>"<?php endif ?>>
<?php ob_start() ?>
<?php endif ?>

<?php if ($this->fullsize && !$image->href) {
$lightboxUrls[] = array(TL_FILES_URL . $image->singleSRC, $image->alt);
$lightboxUrls[] = array(TL_FILES_URL . $image->singleSRC, $image->picture['alt']);
} ?>

<?php
Expand All @@ -34,7 +34,7 @@
);
if ($image->href || $this->fullsize) {
$tagName = 'a';
$attributes[] = 'title="' . $image->alt . '"';
$attributes[] = 'title="' . $image->picture['alt'] . '"';
}
if ($image->href) {
$attributes[] = 'href="' . $image->href . '"';
Expand Down

0 comments on commit d515242

Please sign in to comment.