Hallo,
ich habe mal eine Frage an die PHP Spezialisten unter Euch.
Ich habe die catalog_full.tpl editiert und komme irgendwie nicht mehr weiter. Alle Einträge werden mir mehrfach ausgeworfen. Ich habe Änderungen am endif und/oder endforeach vorgenommen, als Ergebnis wurden mir dann immer gar keine Daten mehr ausgegeben. Vielleicht kann mir jemand einen Tipp geben, wo ich einen Fehler gemacht habe.
Vielen DankPHP-Code:
<?php if (count($this->entries)): ?>
<div class="layout_full">
<?php foreach ($this->entries as $entry): ?>
<div class="item<?php echo $entry['class'] ? ' '.$entry['class'] : ''; ?>">
<?php foreach ($entry['data'] as $field=>$data): ?>
<?php if (strlen($data['raw']) && !in_array($field, array('catalog_name','parentJumpTo'))): ?>
<div class="field <?php echo $field; ?>">
<div class="item<?php echo $entry['class'] ? ' '.$entry['class'] : ''; ?>">
<div class="content">
<div class="name"><?php echo $entry['data']['name']['value']; ?></div>
<div class="ansprechpartner"><?php echo $entry['data']['ansprechpartner']['label']; ?> <?php echo $entry['data']['ansprechpartner']['value']; ?></div>
<div class="anschrift"><?php echo $entry['data']['anschrift']['value']; ?>, <?php echo $entry['data']['plz']['value'];?> <?php echo $entry['data']['ort']['value'];?> (<?php echo $entry['data']['region']['value'];?> ,<?php echo $entry['data']['land']['value'];?>)</div>
<br />
<br />
<div class="telefon"><?php echo $entry['data']['tel_m_vorwahlen']['label']; ?> <?php echo $entry['data']['tel_m_vorwahlen']['value']; ?></div>
<div class="fax"><?php echo $entry['data']['fax_m_vorwahlen']['label']; ?> <?php echo $entry['data']['fax_m_vorwahlen']['value']; ?></div>
<div class="homepage"><?php echo $entry['data']['homepage']['label']; ?> <?php echo $entry['data']['homepage']['value']; ?></div>
<div class="email"><?php echo $entry['data']['email']['label']; ?> <?php echo $entry['data']['email']['value']; ?></div>
</div>
</div>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endforeach; ?>
</div>
<?php else: ?>
<p class="info">Invalid item reference for catalog.</p>
<?php endif; ?>
Stefan
Lesezeichen