How to show category or author info separately on mainpage ?

Everything to do with Joomla! 3.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
evarismedia
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sat Nov 28, 2015 6:15 pm

How to show category or author info separately on mainpage ?

Post by evarismedia » Sat Nov 28, 2015 6:34 pm

Hello everybody,

I would like to ask if it is possible to show author or category information separately on mainpage ? As I see that there is artice info term line and all info terms are in one line. I would like to have date in different style and above text and othe information below text.

I found in foder:
mysite.com/layouts/joomla/content/info_block/publish_date.php

Here is print code: <?php echo JText::sprintf('COM_CONTENT_PUBLISHED_DATE_ON', JHtml::_('date', $displayData['item']->publish_up, JText::_('DATE_FORMAT_LC3'))); ?>

But on mainpage futured articles article info block and different code in folder:

mysite.com/components/com_content/views/featured/tmpl/default_item.php

here is block code: <?php $useDefList = ($params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|| $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') ); ?>

Is it possible use first ine which is separately in default_item.php file ?

If it is wrong please give me how to use it separately.

Thank you

User avatar
ranwilli
Joomla! Master
Joomla! Master
Posts: 19203
Joined: Sun Feb 19, 2006 6:47 pm
Location: Toledo, OH
Contact:

Re: How to show category or author info separately on mainpa

Post by ranwilli » Sat Nov 28, 2015 7:30 pm

Have a look at the override docs...

https://docs.joomla.org/How_to_override ... omla!_core

If you use this method, you'll be safe when Joomla is upgraded.
Don't HACK the Joomla! core, Instead "Extend" and/or "Override."
Stay ON the update path.
https://harpervance.com

evarismedia
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sat Nov 28, 2015 6:15 pm

Re: How to show category or author info separately on mainpa

Post by evarismedia » Sat Nov 28, 2015 7:33 pm

I am using override method, my question is if it is possible to use this code. Or is there any pther method to separate info block items ?

User avatar
JTema
Joomla! Guru
Joomla! Guru
Posts: 733
Joined: Sun Apr 13, 2008 8:10 pm

Re: How to show category or author info separately on mainpa

Post by JTema » Wed Dec 02, 2015 3:22 pm

If it is not too late I have done it for you. Please follow instructions below
1-Unzip attached layouts.zip and com_content.zip
2-Then place them in templates\yourtemplate\html folder
3-After that you should see that your date is upper and other info block is below the article body

I have created a second block called block2.php and called it from com_content's default.php using override.
You do not have the required permissions to view the files attached to this post.
http://www.joomlatema.net - Joomla Extensions and Templates
https://asgardia.joomlatema.net - Asgardia Joomla Gardening Template


Locked

Return to “Templates for Joomla! 3.x”