Hi
OK, I have tracked down the file that generates the layout, layout.parts.php
Here is the code that needs changing (I think)
- Code: Select all
// ReadMore button generator
function readMore_k2($config, $news_id, $news_alias, $news_cat_id, $news_cat_alias) {
//
require_once (JPATH_SITE.DS.'components'.DS.'com_k2'.DS.'helpers'.DS.'route.php');
//
if($config['news_content_readmore_pos'] != 'disabled') {
$class = ' f'.$config['news_content_readmore_pos'];
$link = urldecode(JRoute::_(K2HelperRoute::getItemRoute($news_id.':'.urlencode($news_alias), $news_cat_id.':'.urlencode($news_cat_alias))));
//
if($config['news_content_readmore_pos'] != 'after') {
return '<a class="readon readon_class '.$class.'" href="'.$link.'">'.JText::_('NSP_READMORE').'</a>';
} else {
return '<a class="nsp_readmore inline" href="'.$link.'">'.JText::_('NSP_READMORE').'</a>';
}
if($config['news_content_readmore_pos'] == 'after') {
return '<a class="nsp_readmore inline" href="'.$link.'">'.JText::_('NSP_READMORE').'</a>';
} else {
return '<a class="readon readon_class '.$class.'" href="'.$link.'">'.JText::_('NSP_READMORE').'</a>';
}
} else
return '';
}
I'm guessing that the link$ needs changing to link to the cat but I havent got a clue how to change the item link to the category link, can anyone help?
I can hard code a single category url into the links but if the client wants to add new catergories to the module thats not gonna work (and it's cheating)
TIA
Kev