Page 1 of 1

CreateLink & DoAction methods in module api

Posted: Wed Jul 20, 2005 10:44 am
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

Re: CreateLink & DoAction methods in module api

Posted: Wed Jul 20, 2005 12:25 pm
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.  :)