CreateLink() - links to admin section

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
bbonora
Forum Members
Forum Members
Posts: 48
Joined: Mon Nov 06, 2006 6:10 am

CreateLink() - links to admin section

Post by bbonora »

Hello --

I'm having a little problem with a module I'm working on. The module is an event registration module. When a new event is created it gives the admin user the option to include the event in CGCalendars. I can add the record to CGCalendars without any trouble at all. The issue that I'm having has to do with a link that I would like to include in the description of CGCalendars.

I create the link like this:

Code: Select all

$signuplink = $this->CreateLink($id,'signup',$returnid,$this->Lang('signup'),array('eventid'=>$eventid));
And then pass the variable $signuplink to CGCalendar description field. Once the link is in CGCalendar it outputs this:

http://dev.golfservers.net/admin/module ... _eventid=5

and it's suppose to output this:

http://dev.golfservers.net/index.php?ma ... eturnid=58

This is how I have created the above link - this link is passed to smarty and outputed using a smarty tpl:

Code: Select all

$this->CreateLink($id,'signup',$returnid,$this->Lang('signup'),array('eventid'=>$row['event_id']));
I'm not sure why this is occurring but I would greatly appreciate any help on the issue.
Last edited by bbonora on Mon Mar 22, 2010 10:28 pm, edited 1 time in total.
irish
Forum Members
Forum Members
Posts: 101
Joined: Tue Jun 03, 2008 2:31 pm

Re: CreateLink() - links to admin section

Post by irish »

You probably need to use the CreateFrontendLink instead of the CreateLink method.
Post Reply

Return to “Developers Discussion”