set a template with RegisterRoute?

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
irish
Forum Members
Forum Members
Posts: 101
Joined: Tue Jun 03, 2008 2:31 pm

set a template with RegisterRoute?

Post by irish »

I have set up a registerroute on a module:

Code: Select all

$this->RegisterRoute('/[rR]etail\/cid\/(?P<idContact>[^[:space:]]+)\/(?P<returnid>[0-9]+)$/',
		array('action'=>'prefform','showtemplate='=>'Retail'));
How do I set a template for that specific page? I tried this but it doesn't work:

Code: Select all

$this->RegisterRoute('/[rR]etail\/cid\/(?P<idContact>[^[:space:]]+)\/(?P<returnid>[0-9]+)$/',
		array('action'=>'prefform','showtemplate='=>'Retail'));

I am talking here about the main templates found in admin Layout > Templates and not the templates that I created in the module.


System info:
CMS Version - 1.6.7
PHP:  5.2.14
Last edited by irish on Fri Dec 10, 2010 12:59 pm, edited 1 time in total.
Post Reply

Return to “Developers Discussion”