theme-boxxie MDL-23188 Added support for the custom menu.

This commit is contained in:
Sam Hemelryk 2010-08-27 09:16:59 +00:00
parent 471cf0b860
commit 483a47fac8
4 changed files with 423 additions and 374 deletions

View File

@ -131,18 +131,18 @@ $THEME->layouts = array(
'theme' => 'boxxie',
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>false, 'nocustommenu'=>true),
),
'embedded' => array(
'file' => 'embedded.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>false, 'nocustommenu'=>true),
),
// Should display the content and basic headers only.
'print' => array(
'file' => 'general.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>false),
'options' => array('nofooter'=>true, 'nonavbar'=>true, 'noblocks'=>false, 'nocustommenu'=>true),
),
);

View File

@ -6,6 +6,9 @@ $hasfooter = (empty($PAGE->layout_options['nofooter']));
$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
$custommenu = $OUTPUT->custom_menu();
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
$bodyclasses = array();
if ($hassidepre && !$hassidepost) {
$bodyclasses[] = 'side-pre-only';
@ -15,6 +18,10 @@ if ($hassidepre && !$hassidepost) {
$bodyclasses[] = 'content-only';
}
if ($hascustommenu) {
$bodyclasses[] = 'has-custom-menu';
}
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
@ -42,6 +49,9 @@ echo $OUTPUT->doctype() ?>
}
echo $PAGE->headingmenu; ?>
</div>
<?php if ($hascustommenu) { ?>
<div id="custommenu"><?php echo $custommenu; ?></div>
<?php } ?>
<?php } ?>
</div>

View File

@ -6,6 +6,9 @@ $hasfooter = (empty($PAGE->layout_options['nofooter']));
$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
$custommenu = $OUTPUT->custom_menu();
$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
$bodyclasses = array();
if ($hassidepre && !$hassidepost) {
$bodyclasses[] = 'side-pre-only';
@ -15,6 +18,10 @@ if ($hassidepre && !$hassidepost) {
$bodyclasses[] = 'content-only';
}
if ($hascustommenu) {
$bodyclasses[] = 'has-custom-menu';
}
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
@ -43,6 +50,9 @@ echo $OUTPUT->doctype() ?>
echo $PAGE->headingmenu; ?>
</div>
<?php } ?>
<?php if ($hascustommenu) { ?>
<div id="custommenu"><?php echo $custommenu; ?></div>
<?php } ?>
</div>

File diff suppressed because it is too large Load Diff