Page 1 of 1

[SOLVED] modules and their ids... can not link

Posted: Wed Jan 20, 2010 10:19 am
by manmower
Hi there,

I am currently working on a site where I have 1 page. On this page I start out with 1 module. This module creates a link (With CreateFrontendLink) to the same page and the same module. I use this code

Code: Select all

echo $this->CreateFrontendLink($id, $returnid, 'default', 'Producten', array('display'=>'showcategory', 'showid'=>$params['category']), '', false, true);
I get a link and everything goes well... (the $id is 'm106c5')

On that page I use the same module to create a link to the same page but a different module

Code: Select all

$MA = $this->GetModuleInstance('MemberAdmin');
$MA->CreateFrontendLink($id, $returnid, 'default', '', array('display'=>'search', 'view_company'=>$row['CompanyID']), '', true, true);
This creates a link with an id 'm106c5', but the links doesnt work... But when I change the id to 'cntn01' it does work.
How can I fix this?

Here's a link to the website: http://www.presenter.nl/eengoedhulpmidd ... eedtafel-2

Re: modules and their ids... can not link

Posted: Wed Jan 20, 2010 8:17 pm
by Jeff
when I change the id to 'cntn01' it does work.
You have your answer.

Re: modules and their ids... can not link

Posted: Thu Jan 21, 2010 10:29 am
by manmower
Isnt an id a dynamic variable? I dont want to change al my hardcoded id's if I install my module on another website...

Re: modules and their ids... can not link

Posted: Thu Jan 21, 2010 8:36 pm
by Jeff
"cntn01" is the default id used for returning/displaying the result in the {content} block, you should be fine unless you are trying to do some inline displaying

Re: modules and their ids... can not link

Posted: Mon Jan 25, 2010 2:18 pm
by manmower
Aha, thanks... that's quite useful to know.