Layouts are the different sets of blocks that are placed into regions, and the conditions that control them.
Backdrop's primary tool for positioning content is through Layouts. The Layout module allows you to assign specific "templates" to your site or to specific pages on your site. A "layout template" is the template that defines regions in which pieces of content may be placed.
Definitions
- Layout - a configuration in which a particular layout template has been assigned to a website path. The Default layout applies the default template to all paths without a specified layout.
- Layout template - a page design created with HTML markup and PHP variables that define regions in which pieces of content may be placed
- Layout page - a Layout Page will only affect a single page (or path) on a site. The layout itself generates this page, and if deleted, the page will also be deleted. The default Home page layout included with Backdrop is an example of a Layout Page.
- Layout override - a Layout Override is a layout that can affect multiple pages. In this case, the pages that are affected are always generated by other sources. This type of layout will require the "Existing page content" block to guarantee proper functionality.
Default layouts
To further understand layouts, we can look at the defaults provided by Backdrop. By default, there will be three layouts defined on a new site:
- one for the Home page that uses the Boxton layout
- one for the Default Layout that uses the Moscone Flipped layout
- and one for the Default Administrative Layout that uses the Boxton layout
The Default Layout is assigned for all paths on a Backdrop site, so by default all the pages on your site other than the Home Page will use the Moscone Flipped template, meaning that blocks of content on your site will be arranged in the pattern defined by this template.
If however you decided that all pages on your site should use a different template, you can change the default template by navigating to Structure > Layouts > Default Layout > Configure Layout and change the from Moscone Flipped to a different template of your choice. If you selected Taylor template, for example, to have a two-column sidebar; once you have done this, all site pages would then have a two-column sidebar configuration.
Layout templates
Layout templates are PHP and HTML files which define the regions for a page. Several core templates are provided and more templates can be installed via the Project Installer module.
Core templates include: Boxton, Geary, Harris, Moscone, Moscone Flipped, Rolph, Simmons, Sutro, Taylor, and Taylor Flipped
Each layout defines regions into which blocks can be placed.
Enabling and disabling layout templates
The Layout Settings Page at Admin > Structure > Layouts > Setting lists all core and contributed layout templates and allows you to choose which ones are available when creating new layouts. To disable a layout template, uncheck the checkbox above its icon on this page and click Save Configuration when done.
(See more on customizing your layouts at Deep Dive: Advanced Layout Options)