Hi, I'd like to view extra fileds in category_item.php view, so I copied from item.php the part of code of extra fields and pasted it in category_item.php. When I run that page it says "Invalid argument supplied for foreach". The part of code I copied is this one:<?php if($this->item->params->get('itemExtraFields') && count($this->item->extra_fields)): ?> <!-- Item extra fields --> <div class="itemExtraFields"> <h3><?php echo JText::_('Additional Info'); ?></h3> <ul> <?php foreach ($this->item->extra_fields as $key=>$extraField):?> <li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>"> <span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span> <span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span> <br class="clr" /> </li> <?php endforeach; ?> </ul> <div class="clr"></div> </div> <?php endif; ?>Why I get that error? What am I doing wrong?Thanks in advance.
15 years 11 months ago #91378