Kompletter Eventteaser Eintrag auf Detailseite verlinken?
Hi
gehen wir mal von aus, dass ich eine Eventliste habe ... Dort stehen Datum, Titel und Ort drin ... Standardmäßig ist ja "nur" der Titel mit der Detailseite verlinkt.
Gibt es eine Möglichkeit das gesamte DIV zu verlinken, also
Code:
event layout_teaser upcoming even
Dann wäre es egal wo man da drauf klickt und man muss nicht immer genau auf den Namen klicken...
Am Beispiel hier:
HTML-Code:
https://www.lungauerbildungsverbund.at/
Danke
Liste der Anhänge anzeigen (Anzahl: 1)
Ok.. so halbwegs...
Ich verkomplizier das mal...da sieht das Template dann so aus..Es sind 6 Spalten (mittels autogrid) - Den Part mit "Read More" habe ich eingefügt damit man weiß, dass man da draufklicken muss. Perfekt wäre es ja, wenn das ganze Div aussenrum anklicken könnte....
anbei mal das template und ein Screenshot, wie das ausschaut..
Ich bin zwar grafisch gut, aber PHP mäßig eine Vollniete
Danke Dir
PHP-Code:
<?php
$date = new \Date($this->firstDate);
$newtime = $date->tstamp ?: $this->startDate;
?>
<div class="autogrid_wrapper block event layout_list<?php if($this->classList): ?> <?= $this->classList ?><?php endif; ?>" itemscope itemtype="http://schema.org/Event">
<i class="fa fa-location-arrow"></i>
<div class="autogrid one_sixth block date">
<?php echo $this->parseDate("d", $newtime); ?> <?php echo $this->parseDate("M", $newtime); ?> <?php echo $this->parseDate("Y", $newtime); ?>
</div>
<div class="autogrid one_sixth block categorie">
<?php if ($this->location_contact): ?>
<?php echo $this->location_contact; ?>
<?php endif; ?>
</div>
<div class="autogrid two_sixth block title">
<a href=" <?= $this->href ?>" itemprop="url" title="<?= $this->title ?> (<?php if ($this->day) echo $this->day . ', '; ?><?= $this->date ?><?php if ($this->time) echo ', ' . $this->time; ?>)"<?= $this->target ?>><?= $this->link ?> </a>
<?php if ($this->details): ?>
<p class="more"><a href="<?php echo $this->href; ?>" title="<?php echo $this->readMore; ?>"<?php echo $this->target; ?>><?php echo $this->more; ?> <span class="invisible"><?php echo $this->link; ?></span></a></p>
<?php endif; ?>
</div>
<div class="autogrid one_sixth block location">
<?php if ($this->location): ?>
<?= $this->locationLabel ?>: <?= $this->location ?>
<?php endif; ?>
</div>
<div class="autogrid one_sixth block time" itemprop="startDate">
<?php if ($this->time): ?><i class="fa fa-clock-o"></i><?= $this->time ?><?php else: ?> <?php endif; ?>
</div>
</div>