Last updated April 12, 2013. Created by banghouse on March 8, 2013.
Edited by LeeHunter, kendouglass, okeedoak. Log in to edit this page.
Extensions: Layouts
- Your theme can use multiple layouts, each of which which is kept in a subfolder of 'mytheme/layouts/'.
- To get started with your own layout, you can copy the Omega layouts folder into your sub-theme but you'll need to rename the layouts to something different. The regions declared in your subtheme.info file must match those in your layout info file.
- A layout is an alternative to the main 'mytheme/page.tpl.php' file.
- The default layout for your theme can be selected on the theme settings page.
- The active layout of a given page can be changed through custom code, a Context module reaction or through Panels. This is useful for loading different layouts on different sections of your website.
- The two main elements of a layout are
- A .layout file that describes the layout. The structure of a .layout file is similar to the theme .info file (name, description, and declaration of stylesheets and JavaScript files).
- A page.tpl.php file that provides the HTML structure for the layout
- Using a layout adds a new layer of complexity. Try to keep the structural CSS, scripts, templates... separate from the more global theming of the site's look and feel. Keep all layout-related files in the layout sub-folder and the design files one level up in the theme folder.
Yet Undefined/In-Progress:
- Extensions: Libraries
- Extensions: Development
- Extensions: Compatibility