MDL-20790 more page layouts -see base theme for full list; also added new css body class for describing current layout; base layout is now default for beter BC; require_login() now sets 'incourse' layout automatically

This commit is contained in:
Petr Skoda
2009-12-27 12:02:04 +00:00
parent 7dccaef182
commit 191b267bcd
40 changed files with 128 additions and 49 deletions
+4 -2
View File
@@ -177,7 +177,7 @@ class theme_config {
* <pre>
* $THEME->layouts = array(
* // Most pages - if we encounter an unknown or amissing page type, this one is used.
* 'normal' => array(
* 'standard' => array(
* 'theme' = 'mytheme',
* 'file' => 'normal.php',
* 'regions' => array('side-pre', 'side-post'),
@@ -999,7 +999,8 @@ class theme_config {
if (array_key_exists($pagelayout, $this->layouts)) {
return $this->layouts[$pagelayout];
} else {
return $this->layouts['normal'];
debugging('Invalid page layout specified: ' . $pagelayout);
return $this->layouts['standard'];
}
}
@@ -1028,6 +1029,7 @@ class theme_config {
}
}
debugging('Can not find layout file for: ' . $pagelayout);
// fallback to standard normal layout
return "$CFG->dirroot/theme/base/layout/general.php";
}