mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #2881 from sminnee/fix-forum-templates
FIX: Fixed regression in ContentController template selection.
This commit is contained in:
commit
d6da92edeb
@ -721,6 +721,13 @@ class SSViewer {
|
||||
foreach($classes as $class) {
|
||||
$template = $class . $suffix;
|
||||
if(SSViewer::hasTemplate($template)) $templates[] = $template;
|
||||
|
||||
// If the class is "Page_Controller", look for Page.ss
|
||||
if(stripos($class,'_controller') !== false) {
|
||||
$template = str_ireplace('_controller','',$class) . $suffix;
|
||||
if(SSViewer::hasTemplate($template)) $templates[] = $template;
|
||||
}
|
||||
|
||||
if($baseClass && $class == $baseClass) break;
|
||||
}
|
||||
return $templates;
|
||||
|
Loading…
Reference in New Issue
Block a user