Keyword

"For More Related Articles" link doesn't work

More
13 years 5 months ago #96113 by Ray
I am working on a site which has several mod_k2_content modules on the home page, Each lists 5 catagory items and a "For More Related Articles" link at the bottom. The "For More Related Articles" link is not working and is just a link to the root of the site;

<a class="moduleItemCategory" href="/">

 

I have tried changing the module's parameters by enabling Read More and Intro Text and setting Intro Text to 10 characters but that made no difference.

 

Edit: More info

The modules are using the "titlelist" sub-template.

I found the code that displays the link in this file

modules/mod_k2_content/tmpl/titlelist/default.php

<a class="moduleItemCategory" href="<?php echo $item->categoryLink; ?>">For More Related Articles</a>

The links worked in the old K2 version 2.2 but after updating to 2.4 the links no longer work. I checked and both above mentioned default.php files from the two versions are the same.

 

Found this file that seems to be the problem;

modules/mod_k2_content/helper.php

In the K2 2.2 version this line, 234 is commented out;

233           //Category link234           //if ($params->get('itemCategory'))235             $item->categoryLink = urldecode(JRoute::_(K2HelperRoute::getCategoryRoute($item->catid.':'.urlencode($item->categoryalias))));

 

in the K2 2.4 version this line, 263 is not commented out;

262             //Category link263               if ($params->get('itemCategory'))264               $item->categoryLink = urldecode(JRoute::_(K2HelperRoute::getCategoryRoute($item->catid.':'.urlencode($item->categoryalias))));

 

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum