No "Read More" Links.

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
Fri Jan 10, 2014 6:48 pm
Reply with quote
Report this post
On K2 articles, in "Blog View" - There seems to be no "Read More" links when a read more is applied. Is this intentional?
User avatar
Fresh Boarder

GK User
Fri Jan 10, 2014 7:43 pm
Reply with quote
Report this post
Hi,
you are right, it was hidden in our template.

I suppose that you need those buttons <read more>
User avatar
Platinum Boarder

GK User
Fri Jan 10, 2014 8:27 pm
Reply with quote
Report this post
It would be helpful to have them and use the option to turn them off, if needed.

On a page like "blog", because of the <intro image> being aligned left, it doesn't look right without a <read more>

Thanks.
User avatar
Fresh Boarder

GK User
Fri Jan 10, 2014 10:39 pm
Reply with quote
Report this post
You have to edit this file:
templates\gk_game\html\com_k2\templates\default\category_item.php
and
Code: Select all
   <?php if ($this->item->params->get('catItemReadMore')): ?>
   <!-- Item "read more..." link -->
   <div class="catItemReadMore">
      <a class="k2ReadMore" href="<?php echo $this->item->link; ?>">
         <?php echo JText::_('K2_READ_MORE'); ?>
      </a>
   </div>
   <?php endif; ?>


in line 142+

I made for you this modification
User avatar
Platinum Boarder

GK User
Fri Jan 10, 2014 11:40 pm
Reply with quote
Report this post
Thank You, kindly!
User avatar
Fresh Boarder

GK User
Sat Jan 11, 2014 6:11 pm
Reply with quote
Report this post
Now all you have to do is add some nice CSS for this class.
Code: Select all
a.k2ReadMore  {   }
User avatar
Platinum Boarder

GK User
Wed Feb 26, 2014 3:46 pm
Reply with quote
Report this post
Hi,

Is it possible to have the same trick for non k2 contents?
I use joomla native blog display for categories and also need the "read more" button...

Thank you very much.
User avatar
Fresh Boarder

GK User
Thu Feb 27, 2014 2:15 pm
Reply with quote
Report this post
As I didn't get any reaction to my query, I looked at it further by myself.

For those who want to add the readmore button on the category blog listing (non k2 content), add the following code to /templates/gk_game/html/com_content/category/blog_item.php after line 53 -> <?php echo $this->item->introtext; ?>

Here is the code to add:

<?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


cron