MDL-40255 theme_boxxie/theme_formfactor: Added block-region class to layout files...
[moodle.git] / theme / formfactor / layout / frontpage.php
1 <?php
3 $hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
4 $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
6 $custommenu = $OUTPUT->custom_menu();
7 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
9 $bodyclasses = array();
10 if ($hassidepre && !$hassidepost) {
11     $bodyclasses[] = 'side-pre-only';
12 } else if ($hassidepost && !$hassidepre) {
13     $bodyclasses[] = 'side-post-only';
14 } else if (!$hassidepost && !$hassidepre) {
15     $bodyclasses[] = 'content-only';
16 }
18 echo $OUTPUT->doctype() ?>
19 <html <?php echo $OUTPUT->htmlattributes() ?>>
20 <head>
21     <title><?php echo $PAGE->title ?></title>
22     <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
23     <meta name="description" content="<?php p(strip_tags(format_text($SITE->summary, FORMAT_HTML))) ?>" />
24     <?php echo $OUTPUT->standard_head_html() ?>
25 </head>
26 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
27 <?php echo $OUTPUT->standard_top_of_body_html() ?>
29 <div id="page">
31 <!-- START OF HEADER -->
33     <div id="page-header" class="clearfix">
34         <div id="page-header-wrapper">
35             <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
36             <div class="headermenu">
37                 <?php
38                     echo $OUTPUT->login_info();
39                     echo $OUTPUT->lang_menu();
40                     echo $PAGE->headingmenu;
41                 ?>
42             </div>
43         </div>
44     </div>
46     <?php if ($hascustommenu) { ?>
47       <div id="custommenu"><?php echo $custommenu; ?></div>
48     <?php } else { ?>
49       <ul id="page-navigation" class="clearfix">
50         <li>&nbsp;</li>
51       </ul>
52     <?php } ?>
54 <!-- END OF HEADER -->
56 <!-- START OF CONTENT -->
58 <div id="page-content-wrapper">
59     <div id="page-content">
60         <div id="region-main-box">
61             <div id="region-post-box">
63                 <div id="region-main-wrap">
64                     <div id="region-main">
65                         <div class="region-content">
66                             <?php echo $OUTPUT->main_content() ?>
67                         </div>
68                     </div>
69                 </div>
71                 <?php if ($hassidepre) { ?>
72                 <div id="region-pre" class="block-region">
73                     <div class="region-content">
74                         <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
75                     </div>
76                 </div>
77                 <?php } ?>
79                 <?php if ($hassidepost) { ?>
80                 <div id="region-post" class="block-region">
81                     <div class="region-content">
82                         <?php echo $OUTPUT->blocks_for_region('side-post') ?>
83                     </div>
84                 </div>
85                 <?php } ?>
87             </div>
88         </div>
89     </div>
90 </div>
92 <!-- END OF CONTENT -->
94 <!-- START OF FOOTER -->
96     <div id="page-footer">
97         <p class="helplink">
98         <?php echo page_doc_link(get_string('moodledocslink')) ?>
99         </p>
101         <?php
102         echo $OUTPUT->login_info();
103         echo $OUTPUT->home_link();
104         echo $OUTPUT->standard_footer_html();
105         ?>
106     </div>
108 <!-- END OF FOOTER -->
110 </div>
111 <?php echo $OUTPUT->standard_end_of_body_html() ?>
112 </body>
113 </html>