Permalink
Browse files

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

  • Loading branch information...
Sam Hemelryk
Sam Hemelryk committed Aug 27, 2010
1 parent 471cf0b commit 483a47fac828f913712edc2ff909a9d9bff0d991
Showing with 423 additions and 374 deletions.
  1. +3 −3 theme/boxxie/config.php
  2. +10 −0 theme/boxxie/layout/frontpage.php
  3. +10 −0 theme/boxxie/layout/general.php
  4. +400 −371 theme/boxxie/style/core.css
View
@@ -131,18 +131,18 @@
'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),
),
);
@@ -6,6 +6,9 @@
$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 @@
$bodyclasses[] = 'content-only';
}
+if ($hascustommenu) {
+ $bodyclasses[] = 'has-custom-menu';
+}
+
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
@@ -42,6 +49,9 @@
}
echo $PAGE->headingmenu; ?>
</div>
+ <?php if ($hascustommenu) { ?>
+ <div id="custommenu"><?php echo $custommenu; ?></div>
+ <?php } ?>
<?php } ?>
</div>
@@ -6,6 +6,9 @@
$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 @@
$bodyclasses[] = 'content-only';
}
+if ($hascustommenu) {
+ $bodyclasses[] = 'has-custom-menu';
+}
+
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes() ?>>
<head>
@@ -43,6 +50,9 @@
echo $PAGE->headingmenu; ?>
</div>
<?php } ?>
+ <?php if ($hascustommenu) { ?>
+ <div id="custommenu"><?php echo $custommenu; ?></div>
+ <?php } ?>
</div>
Oops, something went wrong.

0 comments on commit 483a47f

Please sign in to comment.