[K2] Changing 'itemDateCreated' to Category image

Elegant Joomla template designed especially for both professional and personal website presentation.
GK User
Wed Feb 23, 2011 6:04 pm
Hi,

I'd like to change the Top left corner with the 'date created' to display a small category image.

I have tried to change the following code in the item.php:
Code: Select all
<?php if($this->item->params->get('itemDateCreated')): ?>
   <!-- Date created -->
   <div class="itemDateCreated">
      <?php echo JHTML::_('date', $this->item->created , JText::_('DATE_FORMAT_LC2')); ?>
   </div>
<?php endif; ?>


into:
Code: Select all
<?php if($this->item->params->get('itemDateCreated')): ?>
   <!-- Date created -->
   <div class="itemDateCreated">
      <!-- Category image -->
      <img alt="<?php echo $this->category->name; ?>" src="<?php echo $this->category->image; ?>" style="width:100px; height:auto;" />
   </div>
<?php endif; ?>


I know I am working with the right item.php file since the top left corner with the date disappears.... but the category images is not showing.

Is there anybody who can help me with this?

Regard, Gerard
User avatar
Fresh Boarder

cron