Giten Morgen,
ich versuche über die Galerie auch die Bildtitel unetrhalb der Bilder anzuzeigen.
Es wird nur die Bildunterschrift angezeigt (.caption). Besteht auch die Möglicheit, die Bildtitel anzuzeigen?
beste Grüße
Tilda
Giten Morgen,
ich versuche über die Galerie auch die Bildtitel unetrhalb der Bilder anzuzeigen.
Es wird nur die Bildunterschrift angezeigt (.caption). Besteht auch die Möglicheit, die Bildtitel anzuzeigen?
beste Grüße
Tilda
mhm - das funktioneirt leider nicht.
Hie das gesamte Template, wahrscheinlich habe ich es falsch eingefügt ...
Code:<ul class="cols_<?= $this->perRow ?>"> <?php foreach ($this->body as $class=>$row): ?> <?php foreach ($row as $col): ?> <?php if ($col->addImage): ?> <li class="<?= $class ?> <?= $col->class ?>"> <figure class="image_container"<?php if ($col->margin): ?> style="<?= $col->margin ?>"<?php endif; ?>> <?php if ($col->href): ?> <a href="<?= $col->href ?>"<?= $col->attributes ?> title="<?= $col->alt ?>"><?php $this->insert('picture_default', $col->picture); ?></a> <?php else: ?> <?php $this->insert('picture_default', $col->picture); ?> <?php endif; ?> <?php if ($col->caption): ?> <figcaption class="caption"><?= $col->caption ?></figcaption> <?php endif; ?> <?php if ($col->alt): ?> <span class="bildtitel"><?= $col->alt ?></span> <?php endif; ?> </figure> </li> <?php endif; ?> <?php endforeach; ?> <?php endforeach; ?> </ul>
Also bei mir (3.5.1) funktioniert das. Es wird entweder der in der Dateiverwaltung unter Meta-Info eingetragene Titel angezeigt, oder wenn das Feld leer ist, der Dateiname.
Evtl. mal den Cache leeren? Welche Contao Version nutzt Du denn? Gibt es evtl. schon eine CSS-Klasse bildtitel, welche unsichtbar ist?
Hier mal meine funktionierende gallery_default.html5:
Code:<ul class="cols_<?= $this->perRow ?>"> <?php foreach ($this->body as $class=>$row): ?> <?php foreach ($row as $col): ?> <?php if ($col->addImage): ?> <li class="<?= $class ?> <?= $col->class ?>"> <figure class="image_container"<?php if ($col->margin): ?> style="<?= $col->margin ?>"<?php endif; ?>> <?php if ($col->href): ?> <a href="<?= $col->href ?>"<?= $col->attributes ?> title="<?= $col->alt ?>"><?php $this->insert('picture_default', $col->picture); ?></a> <?php else: ?> <?php $this->insert('picture_default', $col->picture); ?> <?php endif; ?> <?php if ($col->caption): ?> <figcaption class="caption"><?= $col->caption ?></figcaption> <?php endif; ?> <?php if ($col->alt): ?> <span class="bildtitel"><?= $col->alt ?></span> <?php endif; ?> </figure> </li> <?php endif; ?> <?php endforeach; ?> <?php endforeach; ?> </ul>
Geändert von Stefko (16.01.2018 um 10:47 Uhr)
Grüße, Stefko
Danke - jetzt hat es geklappt -
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
Lesezeichen