Email link to an internal page required

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
kmm2908
New Member
New Member
Posts: 2
Joined: Tue Mar 23, 2010 10:12 am

Email link to an internal page required

Post by kmm2908 »

I want to issue a link to send out by email to one of our registration pages. The correct event is selected within cmsms by passing a session variable.

The address is something like: www.site/index.php/register

How do I pass in a variable to the page from an email?

Outside of cmsms I would use something like this:

Code: Select all

http://someaddress/index.php?page=register&var1=1
How do I do this inside cmsms?

Any ideas greatly received.
irish
Forum Members
Forum Members
Posts: 101
Joined: Tue Jun 03, 2008 2:31 pm

Re: Email link to an internal page required

Post by irish »

You are using pretty URLs so would need to register a route ($this->RegisterRoute) in your module.php page. it would be something like this if you module is named Register:

Code: Select all

$this->RegisterRoute('/[rR]egister\/(?P<varid>[0-9]+)\/(?P<returnid>[0-9]+)$/');
Then the URL would be like this:

Code: Select all

http://someaddress/register/1
See 'Make your module use clean URLs' on the Wiki:  http://wiki.cmsmadesimple.org/index.php ... ng_Modules
Post Reply

Return to “Developers Discussion”