. /** * The frontpage layout for the Canvas theme. * * @package theme_canvas * @copyright 2010 Patrick Malley * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $hassidepre = $PAGE->blocks->region_has_content('side-pre', $OUTPUT); $hassidepost = $PAGE->blocks->region_has_content('side-post', $OUTPUT); $showsidepre = $hassidepre && !$PAGE->blocks->region_completely_docked('side-pre', $OUTPUT); $showsidepost = $hassidepost && !$PAGE->blocks->region_completely_docked('side-post', $OUTPUT); $custommenu = $OUTPUT->custom_menu(); $hascustommenu = (empty($PAGE->layout_options['nocustommenu']) && !empty($custommenu)); $bodyclasses = array(); if ($showsidepre && !$showsidepost) { $bodyclasses[] = 'side-pre-only'; } else if ($showsidepost && !$showsidepre) { $bodyclasses[] = 'side-post-only'; } else if (!$showsidepost && !$showsidepre) { $bodyclasses[] = 'content-only'; } if ($hascustommenu) { $bodyclasses[] = 'has_custom_menu'; } echo $OUTPUT->doctype() ?> htmlattributes() ?>>