READ MORE not showing in blog layouts

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Thu Nov 06, 2014 6:11 pm
Reply with quote
Report this post
The readmore link is not showing in blog layouts despite enabled globally and tested enabled specifically for a menu.
User avatar
Fresh Boarder

teitbite
Sat Nov 08, 2014 12:21 pm
Reply with quote
Report this post
Hi

Please tell me the url to Your page with an example of the page where Readmore is not showing.
User avatar
Moderator

GK User
Sat Nov 08, 2014 3:30 pm
Reply with quote
Report this post
http://www.graywatch.org/health-information/articles
and all blog layouts on that site.

teitbite wrote:Hi

Please tell me the url to Your page with an example of the page where Readmore is not showing.
User avatar
Fresh Boarder

teitbite
Mon Nov 10, 2014 3:54 pm
Reply with quote
Report this post
Hi

Please edit file /html/com_content/category/blog_item.php and under line 104 add this code:

Code: Select all
<?php if ($params->get('show_readmore') && $this->item->readmore) : ?>
   <p class="readmore"><a class="btn" href="<?php echo $link; ?>"> <span class="icon-chevron-right"></span>
<?php endif; ?>
User avatar
Moderator

GK User
Mon Nov 10, 2014 4:32 pm
Reply with quote
Report this post
I get the button with a href of "/"

teitbite wrote:Hi

Please edit file /html/com_content/category/blog_item.php and under line 104 add this code:

Code: Select all
<?php if ($params->get('show_readmore') && $this->item->readmore) : ?>
   <p class="readmore"><a class="btn" href="<?php echo $link; ?>"> <span class="icon-chevron-right"></span>
<?php endif; ?>
User avatar
Fresh Boarder

GK User
Mon Nov 10, 2014 4:45 pm
Reply with quote
Report this post
P.S. The code isn't properly close with a p tag and its not pulling in the read more text as well. There should be code between the spans.

ozchap wrote:I get the button with a href of "/"

teitbite wrote:Hi

Please edit file /html/com_content/category/blog_item.php and under line 104 add this code:

Code: Select all
<?php if ($params->get('show_readmore') && $this->item->readmore) : ?>
   <p class="readmore"><a class="btn" href="<?php echo $link; ?>"> <span class="icon-chevron-right"></span>
<?php endif; ?>
User avatar
Fresh Boarder

GK User
Mon Nov 10, 2014 7:07 pm
Reply with quote
Report this post
Ok Problem solved I think. I copied the code snippet form the same .php in magazine template to news2. It seems to work. The snippet was ..
<?php if ($params->get('show_readmore') && $this->item->readmore) :
if ($params->get('access-view')) :
$link = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid));
else :
$menu = JFactory::getApplication()->getMenu();
$active = $menu->getActive();
$itemId = $active->id;
$link1 = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId);
$returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid));
$link = new JURI($link1);
$link->setVar('return', base64_encode($returnURL));
endif;
?>
<p class="readmore">
<a href="<?php echo $link; ?>">
<?php if (!$params->get('access-view')) :
echo JText::_('COM_CONTENT_REGISTER_TO_READ_MORE');
elseif ($readmore = $this->item->alternative_readmore) :
echo $readmore;
if ($params->get('show_readmore_title', 0) != 0) :
echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
endif;
elseif ($params->get('show_readmore_title', 0) == 0) :
echo str_replace('...', '', JText::sprintf('COM_CONTENT_READ_MORE_TITLE'));
else :
echo JText::_('COM_CONTENT_READ_MORE');
echo JHtml::_('string.truncate', ($this->item->title), $params->get('readmore_limit'));
endif; ?>
</a>
</p>
<?php endif; ?>
User avatar
Fresh Boarder

teitbite
Tue Nov 11, 2014 11:11 am
Reply with quote
Report this post
Hi

I copied the code from clean joomla installation com_content folder, but it was a guess. Great You've made it working :)
User avatar
Moderator


cron