MDL-40255 theme_boxxie/theme_formfactor: Added block-region class to layout files...
[moodle.git] / theme / boxxie / layout / frontpage.php
CommitLineData
1cbdc5a3
PM
1<?php
2
3$hasheading = ($PAGE->heading);
4$hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
5$hasfooter = (empty($PAGE->layout_options['nofooter']));
6$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
7$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
8
483a47fa
SH
9$custommenu = $OUTPUT->custom_menu();
10$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
11
1cbdc5a3
PM
12$bodyclasses = array();
13if ($hassidepre && !$hassidepost) {
14 $bodyclasses[] = 'side-pre-only';
15} else if ($hassidepost && !$hassidepre) {
16 $bodyclasses[] = 'side-post-only';
17} else if (!$hassidepost && !$hassidepre) {
18 $bodyclasses[] = 'content-only';
19}
20
483a47fa
SH
21if ($hascustommenu) {
22 $bodyclasses[] = 'has-custom-menu';
23}
24
1cbdc5a3
PM
25echo $OUTPUT->doctype() ?>
26<html <?php echo $OUTPUT->htmlattributes() ?>>
27<head>
28 <title><?php echo $PAGE->title; ?></title>
29 <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
30 <?php echo $OUTPUT->standard_head_html() ?>
31</head>
0ae36f66
PS
32
33<body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
1cbdc5a3
PM
34
35<?php echo $OUTPUT->standard_top_of_body_html() ?>
36
37<?php if ($hasheading || $hasnavbar) { ?>
38
39<div id="page-wrapper">
40 <div id="page" class="clearfix">
0ae36f66 41
279fac50 42 <div id="page-header" class="clearfix">
1cbdc5a3
PM
43 <?php if ($PAGE->heading) { ?>
44 <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
45 <div class="headermenu">
46 <?php echo $OUTPUT->login_info();
47 if (!empty($PAGE->layout_options['langmenu'])) {
48 echo $OUTPUT->lang_menu();
49 }
50 echo $PAGE->headingmenu; ?>
51 </div>
483a47fa
SH
52 <?php if ($hascustommenu) { ?>
53 <div id="custommenu"><?php echo $custommenu; ?></div>
54 <?php } ?>
1cbdc5a3
PM
55 <?php } ?>
56 </div>
57
1cbdc5a3 58<?php } ?>
0ae36f66 59
1cbdc5a3 60 <div id="page-content">
8e0d1f85
PM
61 <div id="region-main-box">
62 <div id="region-post-box">
0ae36f66 63
8e0d1f85
PM
64 <div id="region-main-wrap">
65 <div id="region-main">
66 <div class="region-content">
3b3f3028 67 <?php echo $OUTPUT->main_content() ?>
8e0d1f85
PM
68 </div>
69 </div>
70 </div>
0ae36f66 71
8e0d1f85 72 <?php if ($hassidepre) { ?>
d80a7da7 73 <div id="region-pre" class="block-region">
8e0d1f85
PM
74 <div class="region-content">
75 <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
76 </div>
77 </div>
78 <?php } ?>
0ae36f66 79
8e0d1f85 80 <?php if ($hassidepost) { ?>
d80a7da7 81 <div id="region-post" class="block-region">
8e0d1f85
PM
82 <div class="region-content">
83 <?php echo $OUTPUT->blocks_for_region('side-post') ?>
84 </div>
85 </div>
86 <?php } ?>
0ae36f66 87
1cbdc5a3 88 </div>
1cbdc5a3 89 </div>
1cbdc5a3 90 </div>
0ae36f66 91
18fa24aa 92 <div class="clearfix"></div>
1cbdc5a3 93<?php if ($hasfooter) { ?>
0ae36f66 94
1cbdc5a3
PM
95 <div id="page-footer" class="clearfix">
96 <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
19e6204e 97 <?php echo $OUTPUT->login_info(); ?>
1cbdc5a3 98 </div>
0ae36f66
PS
99
100
1cbdc5a3
PM
101<?php }
102
103if ($hasheading || $hasnavbar) { ?>
0ae36f66 104
d80a7da7 105 <div class="myclear"></div>
1cbdc5a3 106 </div> <!-- END #page -->
0ae36f66 107
1cbdc5a3 108</div> <!-- END #page-wrapper -->
0ae36f66 109
1cbdc5a3 110<?php } ?>
19e6204e
PM
111
112<div id="page-footer-bottom">
113
114<?php if ($hasfooter) {
115 echo $OUTPUT->home_link();
116 echo $OUTPUT->standard_footer_html();
117} ?>
118
0ae36f66 119</div>
1cbdc5a3
PM
120
121<?php echo $OUTPUT->standard_end_of_body_html() ?>
122</body>
123</html>