Ich hab's mit eurer Hilfe hinkriegt, mein Template mit spezifischen Klassen zu basteln.
Nur bei der Abfrage auf Leerfelder klappt's irgendwie nicht:
Code:
<div class="<?php echo $this->class; ?> listing block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
<?php if ($this->headline): ?>
<<?php echo $this->hl; ?>><?php echo $this->headline; ?></<?php echo $this->hl; ?>>
<?php endif; ?>
<?php foreach ($this->listItems as $item => $fields): $intField = -1; ?>
<?php foreach ($fields as $field): $intField++; ?>
<?php if ($intField == 0): ?>
<div class="record <?php echo $field['record_class']; ?>">
<?php endif; ?>
<?php if ($field['content'] != ''): ?>
<div class="field <?php echo $field['name']; ?>">
<?php echo $field['content']; ?>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
</div>
Die Leerzelen werden trotzdem angezeigt. Was ist an meinem Anfänger-PHP falsch?
Nachtrag:
Hab's mit weiterem Probieren doch noch geschafft!
PHP-Code:
<?php if (!empty($field['raw'])): ?>
Lesezeichen