CACMS - Golden Content Management System
Generation for Visitors

About
This page explains how index.html is generated if you are logged in as a visitor.

Show mode
Visitors always access your website in show mode. The layout process has changed with version 0.11.0. First the old way and afterwards the new way is presented.

Before 0.11.0
  1. The site layout is picked from the current theme.
  2. This gets parsed and any CaCMS component tags in it are replaced by the actual content of that component.
  3. The container layout associated to the current container is picked.
  4. All the CaCMS component tags in it get replaced as before.
  5. Finally the CaCMS container tag from the site layout is replaced with the container content and we are done.

Disadvantages
Sounds fair enough? Doesn't it? The reason why this has changed in version 0.11.0 is, because it introduces some disadvantages. One is that it uses one single site layout for every container. If you for example wanted to have a start page which shows some intro animation, but not a menu and on all the other pages a menu on the left side, you would not be able to put the menu in the site layout even though it would make sense.

To solve the problem described above, from 0.11.0 on every container may reference an ordered list of templates.

From 0.11.0 on
  1. The ordered list of templates associated to the current container is loaded.
  2. The first (or next) template is poped from the list.
  3. The template gets parsed and any CaCMS component tags in it are replaced by the actual content of that component.
  4. If the the page now contains a CaCMS container tag go back to 2. Otherwise we are done.

Advantages
Lets go back to the example with the intro animation and the menu on all other pages. Doing this is now streight forward. The start page with the intro animation has its own template which only shows the animation. All the other pages use a first template which contains the menu and a second template which holds the content of the page.