Documentation Level: 
Introduction
Documentation Status: 
No known problems

Layouts divide pages on your site into different columns or regions where content can be placed.

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
  • Stand-alone layout - a stand-alone layout will only ever affect a single page on the site. The layout itself generates this page. A good example of a stand-alone layout is the default Home page.
  • Dynamic layout - a dynamic layout 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.

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

Default Layouts

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.

Moscone Flipped

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.

Taylor Template

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

Core Layout Templates

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.

Layout Settings

(See more on customizing your layouts at Deep Dive: Advanced Layout Options)