Hi xrmarcis,
Try following:
That should do the trick.
if you use $item->getItems() method, in case it's important that you use justĀ $myitems, not $myitems->items. Because $item->getItems() returns an array of the item objects
Try following:
PHP Code:
$manager = new IManager();
$item = $manager->getItemClass();
// Initialize all the items of category 2
$item->init(2);
// To get your items on single field
$items = $item->getItems("single=1");
if($items)
{
foreach($items as $myitems)
{
echo '
<div class="row bottom-border">
<div class="c4"><strong>' .$myitems->name . '</strong><br />' .$myitems->fields->descr->value . '</div>
<div class="c2 text-center">$' .$myitems->fields->small->value . '</div>
<div class="c2 text-center">$' .$myitems->fields->medium->value . '</div>
<div class="c2 text-center">$' .$myitems->fields->large->value . '</div>
<div class="c2 text-center">$' .$myitems->fields->xlarge->value . '</div>
</div>
';
};
};
That should do the trick.
if you use $item->getItems() method, in case it's important that you use justĀ $myitems, not $myitems->items. Because $item->getItems() returns an array of the item objects