Default page layout
When Woof! is installed, it installs a file app/controllers/views/_layout.wtf that contains a page layout. Furthermore, it copies this file to app/controllers/views/layout.wtf which makes it the default page layout for all controllers that do not themselves specialize the layout as described in Page layout.
An application may of course replace this default layout in app/controllers/views/layout.wtf with its own version. However, the default layout described here provides sufficient flexibility for many applications.
The default Woof! page layout divides a Web page into five page sections:
- The header section which contains content, such as a banner, that appears at the top of a page.
- The footer section contains content that is to appear at the bottom of a page.
- The main section contains the primary content of the main page.
- The sidebar, which may contain elements such as navigation links that appear alongside the main content. The default layout positions this on the left of the main section or above it.
- The supplement section contains content related to the main content, such as additional related links, advertising. The default layout positions this on the right of the main section or below it.
Section content may be generated either through template files or directly created by application code and is described in the Page sections chapter.
You can tailor several aspects of the default layout for your web site or application. These include
- the title of the generated web page
- the tags and CSS classes used for each section
- the visibility and geometry of each section
- positioning sections on devices of different screen sizes (responsive layout)