What you could do is create an override for the modules you are trying to display and wrap the whole thing in an if clause.
First copy the folder /modules/mod_MYMODULE/tmpl
to /templates/MYTEMPLATE/html
and rename it to the name of your module eg /templates/MYTEMPLATE/html/mod_MYMODULE
.
Then rename default.php
to whatever (for example k2catonly.php
) and wrap it in an if clause eg.
if(JFactory::getApplication()->input->get('view') == 'itemlist') {
// module code
}
Then open said modules in your module manager and select your new sub-template (usually found in the advanced options and called "Alternative Layout".
Now your module will only display on the category. To display it on all pages but the item page wrap it in the following instead:
if(JFactory::getApplication()->input->get('view') !== 'item') {
// module code
}