mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: static publishing now uses the last non-null theme, OR the value defined in StaticPublisher::static_publisher_theme. (from r103255)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112130 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9f61d51635
commit
49496e5c4b
@ -87,6 +87,11 @@ class SSViewer {
|
||||
*/
|
||||
protected static $current_theme = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected static $current_custom_theme = null;
|
||||
|
||||
/**
|
||||
* Create a template from a string instead of a .ss file
|
||||
*
|
||||
@ -101,6 +106,9 @@ class SSViewer {
|
||||
*/
|
||||
static function set_theme($theme) {
|
||||
self::$current_theme = $theme;
|
||||
//Static publishing needs to have a theme set, otherwise it defaults to the content controller theme
|
||||
if(!is_null($theme))
|
||||
self::$current_custom_theme=$theme;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -110,6 +118,13 @@ class SSViewer {
|
||||
return self::$current_theme;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
static function current_custom_theme(){
|
||||
return self::$current_custom_theme;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pass the SilverStripe template to be used.
|
||||
*
|
||||
@ -904,4 +919,4 @@ function supressOutput() {
|
||||
return "";
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
Loading…
Reference in New Issue
Block a user