silverstripe-archive / silverstripe-mobile

Mobile support module for SilverStripe CMS
http://silverstripe.org/mobile/
BSD 3-Clause "New" or "Revised" License
35 stars 36 forks source link

Security Pages do not use Mobile theme when plugin set to use same domain but use mobile theme #27

Closed obj63mc closed 9 years ago

obj63mc commented 11 years ago

Currently when using the mobile plugin if you go to pages like Security/login this will use the template of Page.ss from your default theme with the normal form so while you may have a Security_login.ss file in your mobile theme it will not be used.

In /framework/Security/Security.php it calls - return $customisedController->renderWith(array('Security_login', 'Security', $this->stat('template_main'), 'BlankPage')); but this is fired before the mobile plugin is able to be checked. Not sure how to work around this other than overriding the Security.php file to check if the user is on a mobile session and if so to set the theme to mobile before the renderWith function.

I don't really want to edit a core file so if you have any recommendations on other ways to work around this would be much appreciated.