[solved] How to Get Article Attributes in Template Override

Everything to do with Joomla! 2.5 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.
Locked
rjo
Joomla! Intern
Joomla! Intern
Posts: 59
Joined: Wed May 23, 2007 7:37 pm

[solved] How to Get Article Attributes in Template Override

Post by rjo » Sun Nov 20, 2011 9:33 pm

Hello,
I try to read the show_title attribute in a 1.7.3 Featured Article override with

Code: Select all

$params = &$this->item->params;
$params->get('show_title');
There are two featured articles with different settings. One is set to display the title, the other one is set to not display the title. The global settings are "Display the title". Both articles are uncategorised.

Using the above code in template_name/html/com_content/featured/default_item.php returns the same value (1) for both articles. Why would that be?
BTW, it also happens without the template override and the article properties are correctly stored in the database. Is it a bug?

Thanks for any insight,

Resolved: Kevin Griffiths pointed out on the issue tracker board that the Home menu item needs to be set to "Use Article Settings". Otherwise the global settings overrule the article settings.
Last edited by rjo on Tue Nov 22, 2011 11:29 pm, edited 3 times in total.

User avatar
johans
I've been banned!
Posts: 1293
Joined: Tue Oct 26, 2010 3:54 am
Contact:

Re: How to Get Article Attributes in Template Override (1.7.

Post by johans » Mon Nov 21, 2011 2:19 am

Check the article if there is a title because it is mandatory but you can hide it if you dont want to show.

i suggest to choose editor to view it normally like tinymce or other tools.

Global settings "display title" -- is not the solutions because it is only an article you need to write or over wright.

the simplest way is just log in as an admin in front-end and click edit

tez
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 248
Joined: Tue Nov 14, 2006 3:29 am
Contact:

Re: [solved] How to Get Article Attributes in Template Overr

Post by tez » Wed Aug 26, 2015 3:17 am

Would like an answer, the title question isn't solved.


Locked

Return to “Templates for Joomla! 2.5”