The page format is a very powerful format, but its installation may be non-trivial. It is not recommended for people not having a minimal architectural knowledge of Moodle, and with low coding skill in LAMP open-source platforms.
The installation process focusses:
In addition to the “format/page” component, you will need to install:
/course/format directory of your Moodle installation/blocks directory of your Moodle installation./blocks directories of your Moodle installation. The page format archive comes with a number of add-ins located in the customscripts and theme directories of the distribution.
customscripts and is located at the root of the Moodle installation (but may be eslewhere). $CFG->customscripts = '/path/to/my/moodle/customscripts';
The __theme add-in contains a pseudo-theme “page”. This theme is potentially usable as such, but its use is not recommended because it will not track the customizations of the themes exploited on the platform.
This add-in is here to provide you with the items to add in the themes you otherwise use in Moodle.
This package essentially contains a 'page.php' layout that must be added to the themes you use in the operating platform.
To activate this layout, edit the config.php file of the target theme and add the following lines in the layout definition (Php table):
'format_page' => [
'file' => 'page.php',
'regions' => array('side-pre', 'main', 'side-post', 'footer-left', 'footer-middle', 'footer-right'),
'defaultregion' => 'side-post',
],
'format_page_action' => [
'file' => 'page.php',
'regions' => array('side-pre', 'side-post', 'main', 'footer-left', 'footer-middle', 'footer-right'),
'options' => array('langmenu' => true, 'noblocks' => true),
'defaultregion' => 'side-post',
],
You will probably have to review the header and footer sequences in the layout page.php file. Indeed, each theme producer has his own writing of these sequences. The “active” part of the layout is:
<!-- END OF HEADER -->
<!-- START CUSTOMMENU AND NAVBAR -->
<!-- END OF CUSTOMMENU AND NAVBAR -->
<!-- page content -->
<div id="format-page-content" class="format-page-content container-fluid">
<!-- EVERYTHING HERE IS DEFERRED TO format.php OF THE COURSE FORMAT -->
<? php echo $OUTPUT->main_content();? >
</div>
<!-- START OF FOOTER -->
You can place any header or footer construction, respectively above and below the corresponding marker, from other layout files in your target theme.