No inline when using prettyurls

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
User avatar
dc2
Forum Members
Forum Members
Posts: 116
Joined: Tue Jun 02, 2009 8:21 pm

Re: No inline when using prettyurls

Post by dc2 »

When you use Pretty-URLs you have to specify a returnid-parameter as standard-value in the RegisterRoute-Part, e.g.:

Code: Select all

$returnid = 12345; // the page-ID your Module should be displayed in. note that the module overwrites everything else assigned to {content} on this page.

$defaults = array('returnid' => $returnid);
$this->RegisterRoute('/module\/(?P<item>[0-9]+)\/$/', $defaults);
If you like to let your Users determine the page, you can use something like this:

Code: Select all

$returnid = $this->GetPreference('returnid', false);
Post Reply

Return to “Developers Discussion”