Layout Selection feature

We want means to select a layout based on all sorts of criteria such as the domain used to access the website, the device (iPhone, Desktop...), whether the user is logged in or not, depending on the path, the page, the browser in use, etc.

At this point, we have a Page Layout which actually is used to indicate how the contents of the page is to be placed on the screen. That Page Layout can also be a full page layout in which case that page is set (i.e. it has priority over any other selection.)

The layout should be selectable on a per path basis. For example, if you create a set of pages under the path /journal/ then you can assign all of them a specific layout (although you still have the ability to change the layout on a per page basis.)

Of course the default is to have one layout for the entire website. Only experts will want to play with other such features.


This is already implemented in the form of JavaScript support at the level of selection of the layout. The JavaScript applies to the body (main area) and the theme (look of the website as a whole.)

We will want to feed the JavaScript with parameters as defined here (i.e. device, domain name or IP, whether the user is logged in, etc.) At this time we are limited to basic parameters provided in the database and the JavaScript Date object.

See: Layout feature [core]

Development Status

The selection processing before displaying the website is already available. However, we cannot yet select anything from a page or settings so at this point it is considered Alpha.

Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly