Keyword

Add "Date modified" to K2 content module

  • robm
  • robm's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 9 months ago #108290 by robm
Hello,

I want to add the "Modified Date" to my k2_content_module.
Is this possible and how?

Thank you for your answer

Rob


I already tried to add this code into the default.php code but that didn't work:

<?php if($params->get('itemDateModified')): ?>
<!-- Item date modified -->
<span class="itemDateModified">
<?php echo JText::_('K2_LAST_MODIFIED_ON'); ?> <?php echo JHTML::_('date', $this->item->modified, JText::_('K2_DATE_FORMAT_LC2')); ?>
</span>
<?php endif; ?>

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

More
11 years 6 months ago #108291 by Lee
In the top line, replace 'itemDateModified' to 'itemDateCreated'.

It's only the later part that gets the modified time

ie <?php echo JHTML::_('date', $this->item->modified, JText::_('K2_DATE_FORMAT_LC2')); ?>

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


Powered by Kunena Forum