As per usual, I tried the obvious which failed, eg DoAction, then scoured the API docs, in particular Redirect and RedirectForFrontEnd. Neither worked. I then searched the forum and found this post from years ago: http://forum.cmsmadesimple.org/viewtopi ... orfrontend
OK, so the API docs are a bit out of date (?). Anyhoo, put the new method in my UDT and yes, it redirected to my module BUT the module failed to load as none of the $_GET $params were recognised.
Seems that the create_url method automatically HTML encodes - including the '&' for parameters.
Coding:
Code: Select all
$url = $myLI2module->create_url($id, 'detail', $goto, $params, false, true);
Code: Select all
http://www.mysite.com/index.php?mact=ListIt2MyCustomInstance,cntnt01,detail,0&cntnt01item=17&cntnt01template_detail=my_detail_template&cntnt01returnid=59
The action.detail.php of ListIt2 simply checks for the existence of a particular parameter, ie:
Code: Select all
if (!isset($params['item'])) {
die('missing parameter, this should not happen');
}
Question is did I do something wrong in the UDT coding or is it a bug in the CMSModule method?
Using:
CMSMS v1.11.10
SelfReg: v1.8.2
ListIt2: v1.4.1