Hallo Hendrik
Nun folgend siehst du eines meiner Beispiele, wo ich ein bestehendes Standard-Template "metamodel_prerendered.html5" als Basis genommen habe, um daraus von Hand die von mir gewünschten Attribute einzusetzen... welche wiederum im Frontend angezeigt werden. Vergleich's mit dem Standard-Template, dann merkst du schnell, was zu machen ist, um ein eigenes Template zusammenzubauen.
Enjoy, Luis
HTML-Code:
<?php if (count($this->data)): /* display only if there is data. */ ?>
<div class="layout_full">
<?php foreach ($this->data as $arrItem): /* loop over all items. */ ?>
<div class="item <?php echo $arrItem['class']; ?>">
<h1><?php echo $arrItem['text']['title']; ?> (<?php echo $arrItem['text']['year']; ?>)</h1>
<div class="content">
<div class="field composer">
<span class="label"><?php echo $arrItem['attributes']['composer']; ?></span>
<span class="value"><strong><?php echo $arrItem['text']['composer']; ?></strong></span>
</div>
<div class="field style">
<span class="label"><?php echo $arrItem['attributes']['style']; ?></span>
<span class="value"><?php echo $arrItem['text']['style']; ?></span>
</div>
<div class="field country">
<span class="label"><?php echo $arrItem['attributes']['country']; ?></span>
<span class="value"><?php echo $arrItem['text']['country']; ?></span>
</div>
<div class="field description">
<span class="label"><?php echo $arrItem['attributes']['description']; ?></span>
<span class="value"><?php echo $arrItem['text']['description']; ?></span>
</div>
<div class="field web">
<span class="label"><?php echo $arrItem['attributes']['web']; ?></span>
<span class="value"><a href="<?php echo $arrItem['text']['web']; ?>"><?php echo $arrItem['text']['web']; ?></a></span>
</div>
<div class="field images">
<span class="label"><?php echo $arrItem['attributes']['images']; ?></span>
<span class="value"><?php echo $arrItem['html5']['images']; ?></span>
</div>
</div>
<div class="clear"></div>
</div>
<?php if ($arrItem['jumpTo']): ?><a href="<?php echo $arrItem['jumpTo']['url']; ?>">Zurück zur Liste</a><?php endif; ?>
<?php endforeach; /* item loop */ ?>
</div>
<?php else: /* no items found */ ?><p class="info"><?php echo $this->noItemsMsg; ?></p><?php endif; ?>
Lesezeichen