Force Style for Specific Route Prefix

Deek

Member
I'm working on setting up a developer's area on our forums. I'd like for anything that matches the route prefix I created to use a specific theme that is different from the site's default theme. I don't want to allow users to have any choice in select thing style. Any suggestions on how to do this?
 
You would do this from the Controller that is used by the Route rather than the Route directly.

Just add this to the preDispatch in your controller:
PHP:
$this->setViewStateChange('styleId', 9999);

Replace 9999 with the correct style ID.

You can, of course, surround that with other conditions, e.g. user group.
 
You would do this from the Controller that is used by the Route rather than the Route directly.

Just add this to the preDispatch in your controller:
PHP:
$this->setViewStateChange('styleId', 9999);

Replace 9999 with the correct style ID.

You can, of course, surround that with other conditions, e.g. user group.

That is exactly what I needed. Thanks!
 
Back
Top Bottom