Merged revisions 47263 via svnmerge from

svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-mesq

........
  r47263 | ischommer | 2007-12-18 16:56:54 +1300 (Tue, 18 Dec 2007) | 1 line
  
  added $template_main to control template rendering without subclassing
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52156 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-04-04 23:04:16 +00:00
parent 0cd12814a5
commit 0f69fdf7a4

View File

@ -65,6 +65,13 @@ class Security extends Controller {
*/ */
protected static $wordlist = '/usr/share/silverstripe/wordlist.txt'; protected static $wordlist = '/usr/share/silverstripe/wordlist.txt';
/**
* Template thats used to render the pages.
*
* @var string
*/
public static $template_main = 'Page';
/** /**
* Get location of word list file * Get location of word list file
*/ */
@ -307,9 +314,9 @@ class Security extends Controller {
// custom processing // custom processing
if(SSViewer::hasTemplate("Security_login")) { if(SSViewer::hasTemplate("Security_login")) {
return $customisedController->renderWith(array("Security_login", "Page")); return $customisedController->renderWith(array("Security_login", self::$template_main));
} else { } else {
return $customisedController->renderWith("Page"); return $customisedController->renderWith(self::$template_main);
} }
} }
@ -349,7 +356,7 @@ class Security extends Controller {
)); ));
//Controller::$currentController = $controller; //Controller::$currentController = $controller;
return $customisedController->renderWith("Page"); return $customisedController->renderWith(self::$template_main);
} }
@ -397,7 +404,7 @@ class Security extends Controller {
)); ));
//Controller::$currentController = $controller; //Controller::$currentController = $controller;
return $customisedController->renderWith("Page"); return $customisedController->renderWith(self::$template_main);
} }
@ -467,7 +474,7 @@ class Security extends Controller {
} }
//Controller::$currentController = $controller; //Controller::$currentController = $controller;
return $customisedController->renderWith('Page'); return $customisedController->renderWith(self::$template_main);
} }