I have also gone ahead and fixed a function to make the intro hide and show on the blog view work.
blog_item.php line 56 -58 in my caseCode:
<?php if (!$params->get('show_intro')) : ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php endif; ?>
Changed to (Notice the Quote:
!
removed before the $params to fix this - I have also removed this in templates/[template name]/html/com_content/article/default.php)Code:
<?php if ($params->get('show_intro')) : ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php endif; ?>
Then add Quote:
<?php echo $this->item->introtext; ?>
Code:
<?php if ($params->get('show_intro')) : ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php echo $this->item->introtext; ?>
<?php endif; ?>
Now you can hide the intro text if wanted or show it along.
Now lets get the full text to display
in file - com_content/models/articles.phpLine 162 in my case, findCode:
'a.id, a.title, a.alias, a.title_alias, a.introtext,'
Simply add a Quote:
a.fulltext,
behind that like so...Code:
'a.id, a.title, a.alias, a.title_alias, a.introtext, a.fulltext,'
Logically – if you have read more shown you wont need full text.
Now open your template override file for category blogs
Quote:
templates/[template name]/html/com_content/category/blog_item.php
So lets make it work in the following way – if read more is shown, fulltext is not, if read more is hidden fulltext is shown
find and remove Code:
<?php echo $this->item->introtext; ?>
Then find /b]
Code:
<?php endif; ?>
<?php if ($this->item->state == 0) : ?>
[b]Add before the Quote:
<?php endif; ?>
:
Code:
<?php else : ?>
<?php echo $this->item->fulltext; ?>
like soCode:
<?php else : ?>
<?php echo $this->item->fulltext; ?>
<?php endif; ?>
<?php if ($this->item->state == 0) : ?>
This will show the full text when read more is hidden, and only the read more link when it is is shown
If you want to always display the Full text do it as follow:
Now open your template override file for category blogs
Quote:
templates/[template name]/html/com_content/category/blog_item.php
Find
Code:
<?php echo $this->item->introtext; ?> on line 131 in my case
and change the introtext; to fulltext;Code:
<?php echo $this->item->fulltext; ?>
_________________
Kiteplans.info ►
The daily life of a System Admin► CentOS
► Virtualmin ► Joomla
►Security
All the best guides, hacks and tweaks!
Visit: http://kiteplans.info