I have just been using the extra fields date option for a project of mine. When I came to use the data in the front-end I realised that it was not following my Joomla! core format for the date. If you use the date published this is fine, but I am adding the additional fields to include the date of the course. The published and expiry dates are meaningless to the customer and the customer base for this client will not immediately understand
Y m d
I would rather the output read
l d F Y
I am bringing the output out using the following custom code as I don't need the full Additional Details (extra fields) on the category page (using category_item).
Yes, I realise that my code could be a touch cleaner using class instead of style, but I am hacking right now and will clean this up later.
Y m d
I would rather the output read
l d F Y
I am bringing the output out using the following custom code as I don't need the full Additional Details (extra fields) on the category page (using category_item).
<?php if($this->item->params->get('catItemExtraFields') && count($this->item->extra_fields)): ?>
<!-- Item extra fields -->
<div class="catItemExtraFields">
<?php $custom = $this->item->extra_fields; ?>
<ul>
<li>
<span style="display:block;float:left;font-weight:bold;margin:0 4px 0 0;width:30%;font-weight: bold;"><?php echo $custom[0]->name; ?></span>
<span style="font-weight: normal;"><?php echo $custom[0]->value; ?></span>
</li>
<li>
<span style="display:block;float:left;font-weight:bold;margin:0 4px 0 0;width:30%;font-weight: bold;"><?php echo $custom[1]->name; ?></span>
<span style="font-weight: normal;"><?php echo $custom[1]->value; ?></span>
</li>
</ul> <div class="clr"></div>
</div>
<?php endif; ?>Yes, I realise that my code could be a touch cleaner using class instead of style, but I am hacking right now and will clean this up later.