Themes

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

Theme Rendering Issues

If you are having issues with theme rendering particularly after restoring a site to a new server or using SSL then you might need to rebuild your theme CSS.

You will typical notice an issue on the homepage/login page where none of the images are rendered and the standard bootstrap CSS elements do not get applied and everything will be on the left hand side with no menus etc.

To rebuild your theme CSS use the following command from your moodle root directory:

php admin/cli/build_theme_css.php

Note this can take some time to run.