Wenn der Event keinen Inhalt hat, sollte er eigentlich auch keine Verlinkung in der Übersicht haben!? Zumindest bei News wird abgefragt ob die News Textinhalte hat.
Alternativ könnte man über das Kalender (cal_default.html5) - oder Listentemplate die Verlinkung entfernen.
cal_default.html5
Code:
<tbody>
<?php foreach ($this->weeks as $class => $week): ?>
<tr class="<?= $class ?>">
<?php foreach ($week as $day): ?>
<td class="<?= $day['class'] ?>">
<div class="header"><?= $day['label'] ?></div>
<?php foreach ($day['events'] as $event): ?>
<div class="event cal_<?= $event['parent'] ?><?= $event['class'] ?>" itemscope itemtype="http://schema.org/Event">
<a href="<?= $event['href'] ?>" title="<?= $event['title'] ?> (<?php if ($event['day']): ?><?= $event['day'] ?>, <?php endif; ?><?= $event['date'] ?><?php if ($event['time']): ?> <?= $event['time']?><?php endif; ?>)"<?= $event['target'] ?> itemprop="url"><span itemprop="name"><?= $event['link'] ?></span></a>
</div>
<?php endforeach; ?>
</td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</tbody>
Damit diese Änderung nicht für alle Termine gilt, könnte man z.b. solchen Event eine Klasse "nolink" geben und hier im Template darauf abfragen.
cal_default mit Abfrage auf nolink Klasse
Code:
<tbody>
<?php foreach ($this->weeks as $class => $week): ?>
<tr class="<?= $class ?>">
<?php foreach ($week as $day): ?>
<td class="<?= $day['class'] ?>">
<div class="header"><?= $day['label'] ?></div>
<?php foreach ($day['events'] as $event): ?>
<div class="event cal_<?= $event['parent'] ?><?= $event['class'] ?>" itemscope itemtype="http://schema.org/Event">
<?php if (!strstr($event['class'],"nolink")): ?>
<a href="<?= $event['href'] ?>" title="<?= $event['title'] ?> (<?php if ($event['day']): ?><?= $event['day'] ?>, <?php endif; ?><?= $event['date'] ?><?php if ($event['time']): ?> <?= $event['time']?><?php endif; ?>)"<?= $event['target'] ?> itemprop="url"><span itemprop="name"><?= $event['link'] ?></span></a>
<?php endif; ?>
</div>
<?php endforeach; ?>
</td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</tbody>
Lesezeichen