I have created a custom module (test) that has two buttons - a forward and a backward button. When clicked, the Joomla Ajax Interface is used to call the getAjax() function of helper.php. This works just fine, and I get the expected response. The problems appear, when I have multiple instances of the same module.
I have two problems:
The module has a parameter, where you select the categories you want results returned from. I cannot figure out, how to use this parameter in getAjax(), when there is more than one of these modules. In the mod_test.php, I just use
$params->get('cat_ids')
. That is just not possible in the helper (when there is more than one instance of the module) sinceJModuleHelper::getModule
returns the first module found. Each instance of the module will have different paramters, so it is essential to be able to get these.This problem is similar. How do I make an Ajax request to a specific instance of a module with Joomla Ajax Interface? Right now, I am using
?option=com_ajax&module=test&format=raw
.