CreateLink & DoAction methods in module api

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
ceilingfish

CreateLink & DoAction methods in module api

Post by ceilingfish »

Hi,
I have been looking at the module API today, and I can't for the life of me figure out what the arguments being passed to these two methods are.

Generally I am not sure what values will be passed to $id (if any) and I have been rather stumped by what return_id is.

Does anyone have any help, or know where help can be found?

Cheers,
Tom
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: CreateLink & DoAction methods in module api

Post by Ted »

$id and $return_id are values created by index, moduleinterface and other pages.  $id basically exists so that multiple modules (even of the same type) can exist on the same page.

The id given gets passed to all of the functions that create your html controls and it creates unique name="" values...

Return ID is used to figure out what page the module took over from.  As long as you pass return_id around to all of the functions, then when a module is finished, it will go back to the page it was originally on.  This is like with Comments module.  You hit add comment, it takes over and goes through several pages, and then goes back to page you hit add comment on...

Basically, as long as you pass those values to other functions that want them, you'll be set.  :)
Locked

Return to “CMSMS Core”