Personal tools
You are here: Home Documentation Tutorials Making a website that uses layers to enable a mobile enabled version of the site

Making a website that uses layers to enable a mobile enabled version of the site

This Tutorial applies to: Any version.
This Tutorial is intended for: Developer

As an example application we're going to develop a very simple site that uses macros and then later add a layer dedicated for mobile phone browsing without having to put in "if" statements in your templates to accommodate for the differences you'll want to apply.

All content on one page (useful for printing, presentation mode etc.)

  1. Setting up the web page We'll first write a normal Grok application from scratch that uses macros to put together the templates.
  2. Adding a layer The layer we add will allow us to override and extend views in the default view.
  3. Publishing the layer Views are registered with layers and layers are published by skins.
  4. Discussion The tutorial is deliberately short to make it more approachable but there are of course lots of other interesting options to consider.
Attached files
 

see also:

Macros with Grok
Macros are a way to define a chunk of presentation in one template, and share it in others. Changes to the macro are immediately reflected in all of the places, that share it.