3 $hasheading = ($PAGE->heading);
4 $hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
5 $hasfooter = (empty($PAGE->layout_options['nofooter']));
6 $hassidepre = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-pre', $OUTPUT));
7 $hassidepost = (empty($PAGE->layout_options['noblocks']) && $PAGE->blocks->region_has_content('side-post', $OUTPUT));
9 $showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
10 $showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
12 $custommenu = $OUTPUT->custom_menu();
13 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
15 $bodyclasses = array();
16 if ($showsidepre && !$showsidepost) {
17 $bodyclasses[] = 'side-pre-only';
18 } else if ($showsidepost && !$showsidepre) {
19 $bodyclasses[] = 'side-post-only';
20 } else if (!$showsidepost && !$showsidepre) {
21 $bodyclasses[] = 'content-only';
24 $bodyclasses[] = 'has_custom_menu';
27 echo $OUTPUT->doctype() ?>
28 <html <?php echo $OUTPUT->htmlattributes() ?>>
30 <title><?php echo $PAGE->title ?></title>
31 <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
32 <?php echo $OUTPUT->standard_head_html() ?>
34 <body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
35 <?php echo $OUTPUT->standard_top_of_body_html() ?>
37 <?php if ($hasheading || $hasnavbar) { ?>
38 <div id="page-header">
39 <?php if ($hasheading) { ?>
40 <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
41 <div class="headermenu"><?php
42 echo $OUTPUT->login_info();
43 if (!empty($PAGE->layout_options['langmenu'])) {
44 echo $OUTPUT->lang_menu();
46 echo $PAGE->headingmenu
48 <?php if ($hascustommenu) { ?>
49 <div id="custommenu"><?php echo $custommenu; ?></div>
51 <?php if ($hasnavbar) { ?>
52 <div class="navbar clearfix">
53 <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
54 <div class="navbutton"> <?php echo $PAGE->button; ?></div>
59 <!-- END OF HEADER -->
61 <div id="page-content">
62 <div id="region-main-box">
63 <div id="region-post-box">
65 <div id="region-main-wrap">
66 <div id="region-main">
67 <div class="region-content">
68 <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
73 <?php if ($hassidepre) { ?>
74 <div id="region-pre" class="block-region">
75 <div class="region-content">
76 <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
81 <?php if ($hassidepost) { ?>
82 <div id="region-post" class="block-region">
83 <div class="region-content">
84 <?php echo $OUTPUT->blocks_for_region('side-post') ?>
92 <!-- START OF FOOTER -->
93 <?php if ($hasfooter) { ?>
94 <div id="page-footer" class="clearfix">
95 <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
97 echo $OUTPUT->login_info();
98 echo $OUTPUT->home_link();
99 echo $OUTPUT->standard_footer_html();
104 <?php echo $OUTPUT->standard_end_of_body_html() ?>