Hi!
I have a template with {content}, a content page with a layout which in it load a module using {cms_module module='sbCarriere'}. The module loads and it works. In DoAction(), $action == "default".
I'd like to use the same content page with a different action for the module.
I tryed:
?page=carriere&action=myaction -> same as "default"
?page=carriere&id=test&action=testmyaction -> empty {content}
?page=carriere&mact=sbCarriere,cntnt01,myaction,1 -> shows only the module in {content}
I could override $action in DoAction() if I see a variable in $_GET, but is there an "official" way to do this?
Thanks!
inline module inside {content} with a different $action?
Re: inline module inside {content} with a different $action?
with JoMorg's help, I got:
but with the url: index.php?page=carriere&sbc_action=jobview
I get:

Code: Select all
function SetParameters() {
$this->RegisterModulePlugin(); // to be able to use {sbCarriere} instead of {cms_module sbCarriere}
/* */
$this->RegisterRoute('&sbc_action=(?P<sbc_action>[a-zA-Z]+)$/');
/* Security */
$this->RestrictUnknownParams();
$this->CreateParameter('sbc_action','','help');
$this->SetParameterType('sbc_action',CLEAN_STRING);
}
I get:
Code: Select all
var_dump($action, $params);
string(7) "default" array(2) { ["module"]=> string(10) "sbCarriere" ["action"]=> string(7) "default" }

Re: inline module inside {content} with a different $action?
got it!
which makes:
the template from my content page stays, only the module parts updates
win!
Code: Select all
$this->smarty->assign('job_view', $this->CreateFrontendLink($id, $returnid, 'job_view', 'test'));
Code: Select all
index.php?mact=sbCarriere,m5969d,job_view,1&m5969dreturnid=78&page=78
win!