Zitat von
MacKP
Hallo geheimgirl,
ich habs mal schnell in einer Liste ausprobiert. Da bekomme ich auf jeden Fall
Was bei mir die ID des Items sein dürfte. Mich würde wundern, wenn dir sowas nicht auch ausgegeben wird.
Zur Not:
Mal dein Template posten (so, wie du versuchst an die ID ran zu kommen) und dann noch die Ausgabe. Dann können wir mal genauer schauen ;-)
Viele Grüße
Mit welcher Liste genau ?
Mein Template schaut inkl. der showTemplateVars wie folgt aus:
PHP-Code:
<?php if (count($this->data)): /* display only if there is data. */ ?>
<?php $count = count($this->data); ?>
<div class="artwork-list">
<?php foreach ($this->data as $arrItem): /* loop over all items. */ ?>
<?php
$i++;
if ($i % 4 == 1)
{
echo '<div class="row">';
}
?>
<div class="col-md-3">
<?php if ($arrItem['jumpTo']): ?><a href="<?php echo $arrItem['jumpTo']['url']; ?>">
<?php if ($arrItem['html5']['thumbnail']) : ?>
<?php echo $arrItem['html5']['thumbnail']; ?>
<?php else : ?>
<img src="http://dummyimage.com/110x105/808080/ffffff">
<?php endif; ?>
</a><?php endif; ?>
<p class="grey"><strong><?php echo $arrItem['text']['artist']; ?></strong><br />
<span class="pink strong"><?php echo $arrItem['text']['name']; ?></span><br />
<?php
$price = number_format($arrItem['text']['price'], 2, ',', ' ');
echo "CHF " . $price;
?></p>
<pre>
<?php $this->showTemplateVars(); ?>
</pre>
</div>
<?php
if ($i % 4 == 0 || $i == $count)
{
echo '</div>';
}
?>
<?php endforeach; /* item loop */ ?>
</div>
<?php else: /* no items found */ ?><p class="info"><?php echo $this->noItemsMsg; ?></p>
<?php endif; ?>
Lesezeichen