Keyword

Ayayay how do I show extra fields in the latest_v?

  • Anders Sällstedt
  • Anders Sällstedt's Avatar Topic Author
  • Offline
  • New Member
More
12 years 6 months ago #64402 by Anders Sällstedt
Ayayay how do I show extra fields in the latest_v? was created by Anders Sällstedt
I there, any ideas how I show extra fields in latest_view.php? I have tried to ad:

<?php if($this->item->params->get('itemExtraFields') && count($this->item->extra_fields)): ?>
<!-- Item extra fields -->
<div class="itemExtraFields">
<h3><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h3>
<ul>
<?php foreach ($this->item->extra_fields as $key=>$extraField): ?>
<?php if($extraField->value): ?>
<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>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>

Doesen´t work and I get a:

Warning: Invalid argument supplied for foreach() in /home/liquidde/public_html/poker/templates/rt_gantry/html/com_k2/templates/frontpage/latest_item.php on line 86

Any ideas how to solve it?

Cheers,
Anders

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum