CreateFrontendLink & params problem
Posted: Mon Jan 11, 2010 11:04 am
I have a while loop to list records in a database table. On each record I have an edit link. I am creating that link with the following code:
$rec->edit = $this->CreateFrontendLink($row['id'], $returnid, 'add_edit', $this->Lang('edit'), array('id'=>$rec->id));
However, when the link is clicked the only variable that is in $params on the destination page is the action parameter which contains a value of "add_edit". It should also contain the "id" parameter that is specified as the 5th parameter of CreateFrontendLink, shouldn't it?
The url does contain the id value however, in the example below it is "2".
http://..........moduleinterface.php?mact=ModuleName,2,add_edit,1&sp_=8dfc6a67
Additionally if I output "$id" it always has a value of "m1_" regardless of what record I choose to edit.
Why isn't the id inside of the $params array? How do I access it?
Thanks,
Jay
$rec->edit = $this->CreateFrontendLink($row['id'], $returnid, 'add_edit', $this->Lang('edit'), array('id'=>$rec->id));
However, when the link is clicked the only variable that is in $params on the destination page is the action parameter which contains a value of "add_edit". It should also contain the "id" parameter that is specified as the 5th parameter of CreateFrontendLink, shouldn't it?
The url does contain the id value however, in the example below it is "2".
http://..........moduleinterface.php?mact=ModuleName,2,add_edit,1&sp_=8dfc6a67
Additionally if I output "$id" it always has a value of "m1_" regardless of what record I choose to edit.
Why isn't the id inside of the $params array? How do I access it?
Thanks,
Jay