I have a plugin that has to pre-process the description of a category based on it's params before it displays all the subcategories that it contains.
For articles (context = com_content.article
), the plugin onContentPrepare
event passes $article
and $params
giving everything one would need, but when the context is com_content.category
, $params
is empty, and $article
only has $article->text
.
I know that the category of interest is in the query string, but is there a better way to find category info, etc. that has already been retrieved along the way?
With index.php?option=com_content&view=category&id=123&Itemid=456
public function onContentPrepare($context, &$article, &$params, $page=0)
if($context == 'com_content.category') {
// $article has only article ->text
// $params is empty
// how can I get category params here?
}