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));
8 $haslogininfo = (empty($PAGE->layout_options['nologininfo']));
10 $showsidepre = ($hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT));
11 $showsidepost = ($hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT));
13 $custommenu = $OUTPUT->custom_menu();
14 $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
16 $bodyclasses = array();
17 if ($showsidepre && !$showsidepost) {
18 $bodyclasses[] = 'side-pre-only';
19 } else if ($showsidepost && !$showsidepre) {
20 $bodyclasses[] = 'side-post-only';
21 } else if (!$showsidepost && !$showsidepre) {
22 $bodyclasses[] = 'content-only';
25 $bodyclasses[] = 'has_custom_menu';
28 echo $OUTPUT->doctype() ?>
29 <html <?php echo $OUTPUT->htmlattributes() ?>>
31 <title><?php echo $PAGE->title ?></title>
32 <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
33 <?php echo $OUTPUT->standard_head_html() ?>
35 <body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
36 <?php echo $OUTPUT->standard_top_of_body_html() ?>
38 <?php if ($hasheading || $hasnavbar) { ?>
39 <div id="page-header">
40 <?php if ($hasheading) { ?>
41 <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
42 <div class="headermenu"><?php
44 echo $OUTPUT->login_info();
46 if (!empty($PAGE->layout_options['langmenu'])) {
47 echo $OUTPUT->lang_menu();
49 echo $PAGE->headingmenu
51 <?php if ($hascustommenu) { ?>
52 <div id="custommenu"><?php echo $custommenu; ?></div>
54 <?php if ($hasnavbar) { ?>
55 <div class="navbar clearfix">
56 <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
57 <div class="navbutton"> <?php echo $PAGE->button; ?></div>
62 <!-- END OF HEADER -->
64 <div id="page-content">
65 <div id="region-main-box">
66 <div id="region-post-box">
68 <div id="region-main-wrap">
69 <div id="region-main">
70 <div class="region-content">
71 <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
76 <?php if ($hassidepre) { ?>
77 <div id="region-pre" class="block-region">
78 <div class="region-content">
79 <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
84 <?php if ($hassidepost) { ?>
85 <div id="region-post" class="block-region">
86 <div class="region-content">
87 <?php echo $OUTPUT->blocks_for_region('side-post') ?>
95 <!-- START OF FOOTER -->
96 <?php if ($hasfooter) { ?>
97 <div id="page-footer" class="clearfix">
98 <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
100 echo $OUTPUT->login_info();
101 echo $OUTPUT->home_link();
102 echo $OUTPUT->standard_footer_html();
107 <?php echo $OUTPUT->standard_end_of_body_html() ?>