Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/theme/canvas/layout/general.php
Go to the documentation of this file.
00001 <?php
00002 
00003 $hasheading = ($PAGE->heading);
00004 $hasnavbar = (empty($PAGE->layout_options['nonavbar']) && $PAGE->has_navbar());
00005 $hasfooter = (empty($PAGE->layout_options['nofooter']));
00006 $hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
00007 $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
00008 
00009 $bodyclasses = array();
00010 if ($hassidepre && !$hassidepost) {
00011     $bodyclasses[] = 'side-pre-only';
00012 } else if ($hassidepost && !$hassidepre) {
00013     $bodyclasses[] = 'side-post-only';
00014 } else if (!$hassidepost && !$hassidepre) {
00015     $bodyclasses[] = 'content-only';
00016 }
00017 
00018 echo $OUTPUT->doctype() ?>
00019 <html <?php echo $OUTPUT->htmlattributes() ?>>
00020 <head>
00021     <title><?php echo $PAGE->title ?></title>
00022     <link rel="shortcut icon" href="<?php echo $OUTPUT->pix_url('favicon', 'theme')?>" />
00023     <?php echo $OUTPUT->standard_head_html() ?>
00024 </head>
00025 <body id="<?php p($PAGE->bodyid) ?>" class="<?php p($PAGE->bodyclasses.' '.join(' ', $bodyclasses)) ?>">
00026 <?php echo $OUTPUT->standard_top_of_body_html() ?>
00027 
00028 <div id="page">
00029 
00030 <!-- START OF HEADER -->
00031 
00032     <?php if ($hasheading || $hasnavbar) { ?>
00033     <div id="wrapper" class="clearfix">
00034 
00035         <div id="page-header">
00036             <div id="page-header-wrapper" class="clearfix">
00037                    <?php if ($hasheading) { ?>
00038                 <h1 class="headermain"><?php echo $PAGE->heading ?></h1>
00039                 <div class="headermenu">
00040                     <?php
00041                         echo $OUTPUT->login_info();
00042                            if (!empty($PAGE->layout_options['langmenu'])) {
00043                                echo $OUTPUT->lang_menu();
00044                            }
00045                            echo $PAGE->headingmenu;
00046                     ?>
00047                 </div>
00048                 <?php } ?>
00049             </div>
00050         </div>
00051 
00052         <?php if ($hasnavbar) { ?>
00053             <div class="navbar clearfix">
00054                 <div class="breadcrumb"><?php echo $OUTPUT->navbar(); ?></div>
00055                 <div class="navbutton"> <?php echo $PAGE->button; ?></div>
00056             </div>
00057         <?php } ?>
00058 
00059 <?php } ?>
00060 
00061 <!-- END OF HEADER -->
00062 
00063 <!-- START OF CONTENT -->
00064 
00065         <div id="page-content-wrapper" class="clearfix">
00066             <div id="page-content">
00067                 <div id="region-main-box">
00068                     <div id="region-post-box">
00069 
00070                         <div id="region-main-wrap">
00071                             <div id="region-main">
00072                                 <div class="region-content">
00073                                     <?php echo $OUTPUT->main_content() ?>
00074                                 </div>
00075                             </div>
00076                         </div>
00077 
00078                         <?php if ($hassidepre) { ?>
00079                         <div id="region-pre">
00080                             <div class="region-content">
00081                                 <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
00082                             </div>
00083                         </div>
00084                         <?php } ?>
00085 
00086                         <?php if ($hassidepost) { ?>
00087                         <div id="region-post">
00088                             <div class="region-content">
00089                                 <?php echo $OUTPUT->blocks_for_region('side-post') ?>
00090                             </div>
00091                         </div>
00092                         <?php } ?>
00093 
00094                     </div>
00095                 </div>
00096             </div>
00097         </div>
00098 
00099 <!-- END OF CONTENT -->
00100 
00101 <!-- START OF FOOTER -->
00102 
00103         <?php if ($hasfooter) { ?>
00104         <div id="page-footer" class="clearfix">
00105             <p class="helplink"><?php echo page_doc_link(get_string('moodledocslink')) ?></p>
00106             <?php
00107                 echo $OUTPUT->login_info();
00108                 echo $OUTPUT->home_link();
00109                 echo $OUTPUT->standard_footer_html();
00110             ?>
00111         </div>
00112         <?php } ?>
00113 
00114     <?php if ($hasheading || $hasnavbar) { ?>
00115         </div> <!-- END #wrapper -->
00116     <?php } ?>
00117 
00118 </div> <!-- END #page -->
00119 
00120 <?php echo $OUTPUT->standard_end_of_body_html() ?>
00121 </body>
00122 </html>
 All Data Structures Namespaces Files Functions Variables Enumerations