Where has the read more link gone?

Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Fri Jun 13, 2014 4:50 pm
Reply with quote
Report this post
None of my article intros have a read more button?

It is switched on in options and by the menu - but nothing!

Can't find anywhere in template settings.

Any suggestions?

http://www.derbyalcohol.org.uk/derby-drinkers
User avatar
Expert Boarder

GK User
Fri Jun 13, 2014 7:20 pm
Reply with quote
Report this post
Hello,

Please edit file html/com_content/category/blog_item.php and please add the following code:

Code: Select all
<?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 class="btn" href="<?php echo $link; ?>"> <span class="icon-chevron-right"></span>

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


after lines:

Code: Select all
         <?php if ($params->get('show_hits')) : ?>
         <li class="hits"><?php echo JText::sprintf('COM_CONTENT_ARTICLE_HITS', $this->item->hits); ?></li>
         <?php endif; ?>
      </ul>
      <?php endif; ?>
User avatar
Administrator

GK User
Wed Jun 18, 2014 12:10 pm
Reply with quote
Report this post
We really have to do this just to get a read more button working?
User avatar
Expert Boarder

GK User
Wed Jun 18, 2014 12:20 pm
Reply with quote
Report this post
It worked thank you. Can't you have this as an 'on' 'off' feature in the template?
User avatar
Expert Boarder

GK User
Wed Jun 18, 2014 5:30 pm
Reply with quote
Report this post
It was removed because our designer decided that the layout with these buttons/link will be inconsistent with the rest of the layout.
User avatar
Administrator


cron