Page 1 of 1
How to get the $id and $returnid from a module
Posted: Fri Jul 29, 2011 9:41 am
by Splynx
Hello guys,
have been searching this forum for a solution - but found none.
I need to get the $id and $returnid used by DoAction files to create a link from outside the module (in an ajax file).
I have an instance of the module - how do I get the module $id and module $returnid?
Re: How to get the $id and $returnid from a module
Posted: Thu Aug 04, 2011 8:22 pm
by Splynx
Still need it - what I mean is I need a way to get the $id and $returnid (this one I can get now though) from the $this object I get in my own methods of the module.
Basically I made a new function inside the module php file, and inside that I need a frontendlink made where I need to have the $id and $returnid.
How do I get the $id part? The first part of the link with stuff like:
IMtema,m0cfd6,
Please help - I can't make much sense of the API

Re: How to get the $id and $returnid from a module
Posted: Thu Aug 04, 2011 8:28 pm
by Wishbone
CG* modules define a {$module_id} (or similar) Smarty variable that can be used when a module is instantiated on a page.
Re: How to get the $id and $returnid from a module
Posted: Wed Sep 21, 2011 4:08 pm
by kidcardboard
Try assigning it to a smarty variable in the php file and then use it in the template.
Code: Select all
$smarty->assign('id', $id);
$smarty->assign('returnid', $returnid);