Page Layouts


Page layouts are used to determine how each page is rendered via the following call:

$PAGE->set_pagelayout('layout');

These are defined in the base theme (and can be extended by custom themes):

Have a look in theme/base/config.php or ./bootstrapbase/config.php in new versions in the $THEME->layoutsarray for options.

Examples and comments taken from the existing Moodle code (v3.6) for reference.

// Most backwards compatible layout without the blocks - this is the layout used by default.
base

 // Standard layout with blocks, this is recommended for most pages with general information.
standard

// Main course page.
course

// Course category page
coursecategory

// Part of course, typical for modules - default page layout if $cm specified in require_login().
incourse

// The site home page
frontpage

// Server administration scripts.
admin

// My dashboard page
mydashboard

// My public page
mypublic

// Login
login

// Pages that appear in pop-up windows - no navigation, no blocks, no header.
popup

// No blocks and minimal footer - used for legacy frame layouts only!
frametop

// Embeded pages, like iframe/object embeded in moodleform - it needs as much space as possible.
embedded

// Maintenance page
maintenance

// Should display the content and basic headers only.
print

// The pagelayout used for reports.
report

// The pagelayout used for safebrowser and securewindow.
secure

Revision #1
Created Wed, Aug 7, 2019 5:32 PM by Moodle Wiki
Updated Wed, Aug 7, 2019 5:38 PM by Moodle Wiki