This describes the proposed structure for the twig files, and how to use each one. This structure is a combination of what worked in Dskate and SES.

Template files are written in twig.

None of this is implemented in the Drive installer. Also note that this is still a very rough draft.

Starting Point: _base.twig

This is the file that all pages extend. A few things it contains are:

  • meta data (window title, favicon information)
  • site-wide stylesheets
  • site-wide js
  • Google and Facebook trackers

You can use this page as-is if you just need a blank page with no navbar or footer (e.g. an iframe modal).

Available Blocks

Because all pages extend this file, these blocks are available in all templates:

  • htmlClass: custom classes for <html>
  • windowTitle: allows you to override the first part contained in <title>
  • styles: add page-specific CSS files
  • bodyClass: custom classes for <body>
  • body: page content (note: see _layout_page.twig before you start changing your file)
  • scripts: add page-specific JS files