Keyword

How to delete the time in ItemDateCreated

  • Stéphanie Hernandez
  • Stéphanie Hernandez's Avatar Topic Author
  • Offline
  • New Member
More
6 years 9 months ago #162581 by Stéphanie Hernandez
How to delete the time in ItemDateCreated was created by Stéphanie Hernandez
Hi,
It's the first time I use K2 and on my homepage I use "K2 Agenda" to display events.
It's very nice but I want to delete "Written on", the day ("monday") and the time after the created date. I only want for exemple "23 June 2017"
How can I do it and how to keep this change when I will uptade the template or K2 ?
Thanks a lot,
Stéphanie

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 9 months ago #162584 by Krikor Boghossian
Replied by Krikor Boghossian on topic How to delete the time in ItemDateCreated
Hello,

You can use Joomla!'s language overrides in order to change these strings.

github.com/getk2/k2/blob/master/components/com_k2/templates/default/item.php#L35-L40

In your template overrides you can swap
JHTML::_('date', $this->item->created , JText::_('K2_DATE_FORMAT_LC2'));

with:
JText::_('K2_DATE_FORMAT_LC2')

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Stéphanie Hernandez
  • Stéphanie Hernandez's Avatar Topic Author
  • Offline
  • New Member
More
6 years 9 months ago #162587 by Stéphanie Hernandez
Replied by Stéphanie Hernandez on topic How to delete the time in ItemDateCreated
Thanks Krikor :)

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 9 months ago #162613 by Krikor Boghossian
Replied by Krikor Boghossian on topic How to delete the time in ItemDateCreated
You 're welcome :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum