diff --git a/view/SSViewer.php b/view/SSViewer.php index 71271cbed..f32bcf414 100644 --- a/view/SSViewer.php +++ b/view/SSViewer.php @@ -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;