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

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
manmower
Forum Members
Forum Members
Posts: 15
Joined: Wed May 13, 2009 12:41 pm

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

Post 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
Last edited by manmower on Mon Jan 25, 2010 2:18 pm, edited 1 time in total.
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm
Location: MI

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

Post by Jeff »

when I change the id to 'cntn01' it does work.
You have your answer.
manmower
Forum Members
Forum Members
Posts: 15
Joined: Wed May 13, 2009 12:41 pm

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

Post 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...
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm
Location: MI

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

Post 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
manmower
Forum Members
Forum Members
Posts: 15
Joined: Wed May 13, 2009 12:41 pm

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

Post by manmower »

Aha, thanks... that's quite useful to know.
Post Reply

Return to “Developers Discussion”