meine Templates sehen zum Start etwa so aus:
PHP-Code:
<?php
// Debug items.
if (function_exists('dump')) {
dump($this->data);
}
?>
<?php if (count($this->data)): ?>
<div class="">
<?php foreach ($this->data as $arrItem): ?>
<?= $arrItem['text']['my_attribute'] ?>
<?php endforeach; ?>
</div>
<?php else : ?>
<?php $this->block('noItem'); ?>
<p class="info"><?= $this->noItemsMsg ?></p>
<?php $this->endblock(); ?>
<?php endif; ?>
und baue mit in dem "foreach" das zusammen, was ich benötige...
btw: irgendwelche if-else-Abfragen auf Attributinhalte (z.B. Leer) immer auf dem Knoten 'text' oder 'raw' machen - 'html' ist so gut wie nie leer!
Lesezeichen