Hallo,
wie bereits gesagt verwende ich die Standart-Templates: cal_default.html5 bzw. cal_default.xhtml.
Habe die Standart-Templates einen neuen Namen gegeben: cal_default_intern.html5 bzw. cal_default_intern.xhtml
Wenn ich den Code um folgende Zeilen ergänze: <?= $event['details'] ?>
PHP-Code:
<table class="calendar">
<thead>
<tr>
<th colspan="2" class="head previous"><?php if ($this->prevHref): ?><a href="<?= $this->prevHref ?>" title="<?= $this->prevTitle ?>"><?= $this->prevLink ?></a><?php else: ?> <?php endif; ?></th>
<th colspan="3" class="head current"><?= $this->current ?></th>
<th colspan="2" class="head next"><?php if ($this->nextHref): ?><a href="<?= $this->nextHref ?>" title="<?= $this->nextTitle ?>"><?= $this->nextLink ?></a><?php else: ?> <?php endif; ?></th>
</tr>
<tr>
<?php foreach ($this->days as $i=>$day): ?>
<th class="label<?= $day['class'] ?>"><?= utf8_substr($day['name'], 0, $this->substr) ?><span><?= utf8_substr($day['name'], $this->substr) ?></span></th>
<?php endforeach; ?>
</tr>
</thead>
<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'] ?>">
<a href="<?= $event['href'] ?>" title="<?= $event['title'] ?> (<?php if ($event['day']) echo $event['day'] . ', '; ?><?= $event['date'] ?><?php if ($event['time']) echo ', ' . $event['time']; ?>)"<?= $event['target'] ?>><?= $event['link'] ?></a>
--> <?= $event['details'] ?>
</div>
<?php endforeach; ?>
</td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
Erscheint folgende Fehlermeldung:
Code:
Recoverable error: Object of class Closure could not be converted to string in templates/cal_default_intern.html5 on line 23
#0 templates/cal_default_intern.html5(23): __error(4096, 'Object of class...', '/data/web/e2405...', 23, Array)
#1 system/modules/core/library/Contao/BaseTemplate.php(88): include('/data/web/e2405...')
#2 system/modules/core/library/Contao/Template.php(277): Contao\BaseTemplate->parse()
#3 system/modules/core/classes/FrontendTemplate.php(46): Contao\Template->parse()
#4 system/modules/calendar/modules/ModuleCalendar.php(171): Contao\FrontendTemplate->parse()
#5 system/modules/core/modules/Module.php(287): Contao\ModuleCalendar->compile()
#6 system/modules/calendar/modules/ModuleCalendar.php(79): Contao\Module->generate()
#7 system/modules/core/elements/ContentModule.php(59): Contao\ModuleCalendar->generate()
#8 system/modules/core/library/Contao/Controller.php(484): Contao\ContentModule->generate()
#9 system/modules/core/modules/ModuleArticle.php(213): Contao\Controller::getContentElement(Object(Contao\ContentModel), 'main')
#10 system/modules/core/modules/Module.php(287): Contao\ModuleArticle->compile()
#11 system/modules/core/modules/ModuleArticle.php(67): Contao\Module->generate()
#12 system/modules/core/library/Contao/Controller.php(417): Contao\ModuleArticle->generate(false)
#13 system/modules/core/library/Contao/Controller.php(277): Contao\Controller::getArticle(Object(Contao\ArticleModel), false, false, 'main')
#14 system/modules/core/pages/PageRegular.php(133): Contao\Controller::getFrontendModule('0', 'main')
#15 system/modules/core/controllers/FrontendIndex.php(285): Contao\PageRegular->generate(Object(Contao\PageModel), true)
#16 index.php(20): Contao\FrontendIndex->run()
#17 {main}
Mein PHP ist nicht so gut, daher stehe ich an bzw. weiß ich nicht wie ich den Fehler beheben kann.
Danke
Lesezeichen