Nach einiger Suche bin ich auf die folgende Lösung gekommen und habe das event_list Template ergänzt:
PHP-Code:
<?php if ($this->header): ?>
<div class="header<?php echo $this->classHeader; ?>">
<span class="date"><?php echo $this->firstDate; ?></span><?php if ($this->firstDay): ?> <span class="day">(<?php echo $this->firstDay; ?>)</span><?php endif; ?>
</div>
<?php endif; ?>
<div class="event layout_list<?php echo $this->classList; ?>">
<h2><a href="<?php echo $this->href; ?>" title="<?php echo $this->title; ?> (<?php if ($this->day): echo $this->day; ?>, <?php endif;
echo $this->date;
if ($this->time): ?>, <?php echo $this->time;
endif; ?>)"<?php echo $this->target; ?>><?php echo $this->link; ?></a></h2>
<?php if ($this->time || $this->span): ?>
<p class="time"><?php echo $this->time . $this->span; ?></p>
<?php endif; ?>
<div class="ce_text">
<?php echo $this->details; ?>
</div>
<!-- kommentare abfragen start event_list_800.xhtml-->
<div class="ce_comments block">
<?php
$this->import('Database');
$objComments = $this->Database->prepare("SELECT comment, name, date, website FROM tl_comments WHERE published=1 AND parent=?")->execute($this->id);
$zaehler = 0;
while ($objComments->next()) {
$commentText = '';
if ($objComments->comment) :
if ($zaehler === 0): $commentText .='<h2>Kommentare</h2>';
endif;
$zaehler++;
$commentText .='<p class="info">';
if ($objComments->website): $commentText.=' <a href="' . $objComments->website . '" rel="nofollow"' . LINK_NEW_WINDOW . '>';
endif;
$commentText.= $objComments->name;
if ($objComments->website): $commentText.='</a>';
endif;
$commentText.='<span class="date"> | ' . $this->parseDate($GLOBALS['TL_CONFIG']['dateFormat'], $objComments->date) . '</span></p>';
$commentText .= "<div class=" . $objComments->class . ' block ' . $objComments->cssID;
if ($objComments->style) : $commentText.=' style="' . $objComments->style . '"';
endif;
$commentText.='>';
if ($objComments->headline): $commentText.='<' . $objComments->hl . '>' . $objComments->headline . '</' . $this->hl . '>';
endif;
$commentText.=$objComments->comment;
$commentText.='</div>';
echo $commentText;
endif;
}
?>
<a href="<?php echo $this->href; ?>#com_tl_calendar_events_<?php echo $this->id; ?>" title="Einen Kommentar schreiben">Einen Kommentar schreiben</a>
</div>
<!-- kommentare abfragen ende event_list_800.xhtml-->
</div>
Es geht sicher noch eleganter, aber so funktioniert es erstmal.
Lesezeichen