saguaros Hi, so I have the next extra items fields defined on the event. They are all Drop-down selection:
The problem is, that if I add the following code to latest_item2.php:
<?php if(isset($this->item->extra_fields['dvorana'])) : ?>
<small>
<i class="gk-icon-clock"></i>
<?php echo $this->item->extra_fields['dvorana']; ?>
</small>
<?php endif; ?>
I get as a result number 2. (select option id probably). If I write $item to console I see:
"extra_fields":{"eventhours":"17:00 - 17:45","tezavnost":"1","dvorana":"2","podrocje":"6","":"3"}
So these number should resolve to an actual text as seen in the picture.
I think that I would need for the field drop-down selection the following code, but I don't get any results:
<?php if($this->item->params->get('catItemExtraFields') && count($this->item->extra_fields)): ?>
<!-- Item extra fields -->
<div class="events-data">
<dl>
<?php foreach ($this->item->extra_fields as $key=>$extraField): ?>
<?php if($extraField->value != ''): ?>
<dt><?php echo $extraField->name; ?></dt>
<dd><?php echo $extraField->value; ?></dd>
<?php endif; ?>
<?php endforeach; ?>
</dl>
</div>
<?php endif; ?>