I want to get the related items of an article order by created and only show the related items that have the same catid.

To accomplish that i must change the helper.php code and add this code:

$catid = JRequest::getInt('catid'); 
$query->order('a.created DESC');

The problem here is, i don't know how to override the helper.php on my template. I've already tried to create the file templates/<template>/html/mod_related_items/helper.php and copy the core code to there but it didn't work.

How can i accomplish this without editing core code?

1 Answer 1


Templates can only override template/layout files. You can fork the module or use a plugin like MVC Override https://gruz.ml/en/extensions/mvcoverride.html.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.