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