[SOLVED] Full text in Leading article?

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
alekks
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Wed Jan 23, 2008 8:05 pm

[SOLVED] Full text in Leading article?

Post by alekks » Thu May 17, 2012 3:26 pm

Hi,

I'm working on a site for a client where we're using a category blog-layout.
This is configured to show 1 leading article and 4 intro articles in two columns and then a couple of links.

These articles are quite long all of them so my client will always be using the read more-break on every article. Though, we always want the latest article (leading article) to show full text, in other words; ignore the read more. But when my client adds a new article the read more break will be activated as the article will move from leading to intro article.

I've already have got some specific outputs conditioned on if it's a leading or intro article, so what I need is just a way to call the full text in the category blog view... But how do I do this?

I read in a forum post that I could use $this->item->fulltext instead of $this->item->introtext. But it displays nothing when I try that.

I really appriciate all the help!

Thanks a lot!
Last edited by alekks on Thu May 17, 2012 6:20 pm, edited 1 time in total.

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 28202
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Full text in Leading article?

Post by imanickam » Thu May 17, 2012 4:35 pm

If an article contains the ReadMore tag, then the content is stored as follows:
introtext -> Text before the ReadMore tag
fulltext -> Text after the ReadMore tag

If an article does not contain the ReadMore tag, then the content is stored as follows:
introtext -> Full text of the article
fulltext -> NOTHING would be stored here
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged

alekks
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Wed Jan 23, 2008 8:05 pm

Re: Full text in Leading article?

Post by alekks » Thu May 17, 2012 4:49 pm

Thank you for your answer!

So if I understand this correctly this should write the full article:

if leading article == true {
echo $this->item->introtext;
echo $this->item->fulltext;
}

But it just displays text before ReadMore...

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 28202
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Full text in Leading article?

Post by imanickam » Thu May 17, 2012 5:21 pm

Which file are you changing?

Hope you are following output override technique as documented at http://docs.joomla.org/How_to_override_ ... omla!_core.

Also, try the following:
Add the following line of code in the file articles.php located in the directory \components\com_content\models. Add it as line 164.

Code: Select all

				'a.fulltext, ' .
Note: Make a copy of the file before editing it.
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged

alekks
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Wed Jan 23, 2008 8:05 pm

Re: Full text in Leading article?

Post by alekks » Thu May 17, 2012 6:20 pm

Thank you very much imanickam! This helped me a lot!

I now see the both "parts" of the article!

Cheers!

rrr2rrr
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Jul 31, 2012 7:36 pm

Re: [SOLVED] Full text in Leading article?

Post by rrr2rrr » Tue Jul 31, 2012 7:38 pm

Thank you very much! Awesome solution!


Locked

Return to “Templates for Joomla! 2.5”