Keyword

Remove time on frontpage

  • JoomlaWorks
  • JoomlaWorks's Avatar Topic Author
  • Offline
  • Admin
More
1 year 8 months ago #180820 by JoomlaWorks
Remove time on frontpage was created by JoomlaWorks
All such options are under each category's settings. If you have lots of categories, it makes sense to create a "template" category and have all others (or some) inherit the display options of this "template" category.

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

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

  • JoomlaWorks
  • JoomlaWorks's Avatar Topic Author
  • Offline
  • Admin
More
1 year 8 months ago #180836 by JoomlaWorks
Replied by JoomlaWorks on topic Remove time on frontpage
~ The quick way:
Locate K2_DATE_FORMAT_LC2 in your frontend language files. This is a language string defined in K2's language files and if you change it, it will instantly change any part of K2 in the frontend that uses it (most).

github.com/getk2/k2/blob/d0c84174ea9c07b80675b62daa028fce1612085c/language/en-GB/en-GB.com_k2.ini#L43

Change K2_DATE_FORMAT_LC2="%A, %d %B %Y %H:%M" to K2_DATE_FORMAT_LC2="%A, %d %B %Y" for example.

~ The clean way:
Create a sub-template (with an override for category_item.php) and have one ore more categories use that sub-template wherever you like. The category_item.php override you'll make can have a different date/time format.

E.g. in this line getk2.org/documentation/tutorials/templating-with-k2-and-the-concepts-of-sub-templates you'd change JText::_('K2_DATE_FORMAT_LC2') to JText::_('Y.m.d') to show just the date (date formatting is here: www.php.net/manual/en/datetime.format.php).

Read this for more info on K2 templating: getk2.org/documentation/tutorials/templating-with-k2-and-the-concepts-of-sub-templates

Fotis / 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