[FIX] plg-carousel: empty image caption created empty div and heading
This commit is contained in:
parent
c4bb915a78
commit
8248319f97
|
@ -42,10 +42,12 @@ if (!(false==$carouselFolder) && ($carouselFolder->hasImages())) : echo $preNorm
|
||||||
<?php $n=-1; foreach($carouselFolder->images()->sortBy($sort, $sdir) as $image): $n++; ?>
|
<?php $n=-1; foreach($carouselFolder->images()->sortBy($sort, $sdir) as $image): $n++; ?>
|
||||||
<div class="carousel-item<?php if($n==0) echo ' active' ?>">
|
<div class="carousel-item<?php if($n==0) echo ' active' ?>">
|
||||||
<img src="<?php echo $image->url() ?>" alt="<?php echo $image->title()->html() ?>" />
|
<img src="<?php echo $image->url() ?>" alt="<?php echo $image->title()->html() ?>" />
|
||||||
|
<?php if(($image->heading() != "") || ($image->caption() != "")) : ?>
|
||||||
<div class="carousel-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() ?>
|
<?php echo $image->caption()->kirbytext() ?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue