1
0
Fork 0

[FIX] plg-carousel: empty image caption created empty div and heading

This commit is contained in:
Jannik Beyerstedt 2019-04-07 19:37:52 +02:00
parent c4bb915a78
commit 8248319f97
1 changed files with 3 additions and 1 deletions

View File

@ -42,10 +42,12 @@ if (!(false==$carouselFolder) && ($carouselFolder->hasImages())) : echo $preNorm
<?php $n=-1; foreach($carouselFolder->images()->sortBy($sort, $sdir) as $image): $n++; ?>
<div class="carousel-item<?php if($n==0) echo ' active' ?>">
<img src="<?php echo $image->url() ?>" alt="<?php echo $image->title()->html() ?>" />
<?php if(($image->heading() != "") || ($image->caption() != "")) : ?>
<div class="carousel-caption">
<h3><?php echo $image->heading()->kirbytext() ?></h3>
<?php if($image->heading() != "") : ?><h3><?php echo $image->heading()->kirbytext() ?></h3><?php endif; ?>
<?php echo $image->caption()->kirbytext() ?>
</div>
<?php endif; ?>
</div>
<?php endforeach ?>
</div>