Bildunterschrift verlinken
Um die Bildunterschrift eines Bildes mit dem gleichen Link zu versehen, wie das Bild, habe ich bereits das Template geändert (dank der Tipps hier im Forum).
PHP-Code:
<!-- ce_image Template geändert von <figcaption ... bis ... /figcaption> -->
<?php $this->extend('block_searchable'); ?>
<?php $this->block('content'); ?>
<figure class="image_container"<?php if ($this->margin): ?> style="<?= $this->margin ?>"<?php endif; ?>>
<?php if ($this->href): ?>
<a href="<?= $this->href ?>"<?php if ($this->linkTitle): ?> title="<?= $this->linkTitle ?>"<?php endif; ?><?= $this->attributes ?>>
<?php endif; ?>
<?php $this->insert('picture_default', $this->picture); ?>
<?php if ($this->href): ?>
</a>
<?php endif; ?>
<?php if ($this->caption): ?>
<figcaption class="caption"><?php if ($this->href): ?><a href="<?php echo $this->href; ?>"><?php endif; ?><?php echo $this->caption; ?><?php if ($this->href): ?></a><?php endif; ?></figcaption>
<?php endif; ?>
</figure>
<?php $this->endblock(); ?>
Das klappt auch wunderbar.
Jetzt hätte ich aber gerne, dass nicht nur der Text verlinkt ist, sondern das ganze Feld, in dem die Bildunterschrift steht.
Hier könnt ihr mein Experiment ansehen:
http://mkgd6.bettinaknell.de/index.php/beispiel.html