Commit aada15e7 authored by Aaron Wells's avatar Aaron Wells Committed by Gerrit Code Review
Browse files

Expect plugin theme directories to have a "templates" subdirectory

Bug 1328319. Still keeping the old location in the search path as well,
for backwards-compatibility.

Change-Id: Iee2c908bad933a3942f103df6f827ace3beee259
parent fd85506f
......@@ -57,15 +57,15 @@ class Dwoo_Template_Mahara extends Dwoo_Template_File {
$includePath[] = get_config('docroot') . "local/theme/{$pluginpath}/templates";
// Then look for files in a custom theme
// - /theme/{themename}/{plugintype}/{pluginname}/templates
foreach ($THEME->inheritance as $theme) {
$includePath[] = get_config('docroot') . "theme/{$theme}/{$pluginpath}/templates";
}
// Lastly look for files in the plugin itself
// - /{plugintype}/{pluginname}/theme/{themename}
// (Plugin templates are loose under the theme directory, not in a "templates" subdirectory)
foreach ($THEME->inheritance as $theme) {
$includePath[] = get_config('docroot') . "{$pluginpath}/theme/{$theme}/templates";
// For legacy purposes also look for the template file loose under the theme directory.
$includePath[] = get_config('docroot') . "{$pluginpath}/theme/{$theme}";
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment