weekly release
[moodle.git] / theme / formfactor / layout / frontpage.php
CommitLineData
1c601a53
PM
1<?php
2
3$hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT);
4$hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT);
5
2bf93a3c
SH
6$custommenu = $OUTPUT->custom_menu();
7$hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu));
8
1c601a53
PM
9$bodyclasses = array();
10if ($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}
17
18echo $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 echo strip_tags(format_text($SITE->summary, FORMAT_HTML)) ?>" />
24 <?php echo $OUTPUT->standard_head_html() ?>
25</head>
26<body id="<?php echo $PAGE->bodyid ?>" class="<?php echo $PAGE->bodyclasses.' '.join(' ', $bodyclasses) ?>">
27<?php echo $OUTPUT->standard_top_of_body_html() ?>
28
29<div id="page">
30
31<!-- START OF HEADER -->
32
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>
45
43d65a95
PM
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 } ?>
53
1c601a53
PM
54<!-- END OF HEADER -->
55
56<!-- START OF CONTENT -->
57
58<div id="page-content-wrapper">
59 <div id="page-content">
60 <div id="region-main-box">
61 <div id="region-post-box">
62
63 <div id="region-main-wrap">
64 <div id="region-main">
65 <div class="region-content">
66 <?php echo core_renderer::MAIN_CONTENT_TOKEN ?>
67 </div>
68 </div>
69 </div>
70
71 <?php if ($hassidepre) { ?>
72 <div id="region-pre">
73 <div class="region-content">
74 <?php echo $OUTPUT->blocks_for_region('side-pre') ?>
75 </div>
76 </div>
77 <?php } ?>
78
79 <?php if ($hassidepost) { ?>
80 <div id="region-post">
81 <div class="region-content">
82 <?php echo $OUTPUT->blocks_for_region('side-post') ?>
83 </div>
84 </div>
85 <?php } ?>
86
87 </div>
88 </div>
89 </div>
90</div>
91
92<!-- END OF CONTENT -->
93
94<!-- START OF FOOTER -->
95
96 <div id="page-footer">
97 <p class="helplink">
98 <?php echo page_doc_link(get_string('moodledocslink')) ?>
99 </p>
100
101 <?php
102 echo $OUTPUT->login_info();
103 echo $OUTPUT->home_link();
104 echo $OUTPUT->standard_footer_html();
105 ?>
106 </div>
107
108<!-- END OF FOOTER -->
109
110</div>
111<?php echo $OUTPUT->standard_end_of_body_html() ?>
112</body>
c54c8b35 113</html>