Client spaces



Example of a page in edit mode with a model having two client spaces (outlined in green):

Page : text row edition  

Example of a page in edit mode.  In this client space several rows are arranged.  It is possible to add others, then delete them or modify their content:

   Rows : drag and drop

Things to remember


A page has 2 distinct parts:

The form:

A page uses a "page model" (this is a kind of "skeleton" for the page), which in turn contains one or several "client spaces".

Each client space permits one or many "content rows".

The content:

The content is prepared by the site editor using the "content rows".

You simply edit and enter the desired content (text, images, etc...).

How it works

The tag <atm-clientspace />

In a page model, client spaces are defined by the tag <atm-clientspace />.

Note that it a self-closing tag with 2 attributes:

  • module:  This is the code name of the module.  Generally a "standard" module is used; it is the principal module of Automne: page management.  It is possible, however, to indicate all other modules.
  • id :  This is the identifier of the client space within the page model.  It must be unique.  When you insert content rows in this client space, Automne associates the rows with this unique identifier.

This gives us, for example: <atm-clientspace module="standard" id="first" />


We advise you to name your client spaces according to their priority in the model:

 - "first" for the most important client space
 - "second" for the second client space
 - "third" for the third
 - ... and so on...

The principle reason for this is that in order to switch one page model for another it is necessary for the models to be compatible.  That is to say they have client spaces whose identifiers (id) correspond.
                                                                                                                           If a page is associated with a page model that has 2 client spaces and we switch to a model possessing only 1, a loss of data from the second client space will result.  Thus, by naming your client spaces, you can be sure that the data belonging to the most important client space is conserved in case you switch the model.

Regeneration of a page

Technically, when a page is regenerated, Automne will look for the rows associated with this page and client space and then replace the tag with the corresponding content.

Here is an exampe of a "client space" tag within the model:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" lang="fr">
    <title><atm-constant name="APPLICATION_LABEL" /> : <atm-title /></title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <atm-meta-tags />
<div id="page">
    <div id="rightBox">
        <atm-clientspace module="standard" id="first" />
    <div id="leftBox">
        <atm-clientspace module="standard" id="second" />

Concrete example

Module : pnews (created with the module generator polymod)

Tag : <atm-clientspace module="pnews" id="homepagenews" type="homepage" />

From this tag Automne will call the corresponding module by the codename "pnews".

It is a polymod module having the classes and features necessary to handle this tag.

The tag is interpreted by the polymod module in the following manner:  the module is configured to understand this tag and returns the content to the following file:

/automne/templates/mod_[code du module]_[attribut "type" du tag clientspace].php

In our example, Automne will automatically insert, in place of the tag, the contents of the file/automne/templates/mod_pnews_homepage.php.

This example uses the polymod module, the module generator behind Automne.  The behavior regarding the clientspace tag is already configured.

It is therefore possible to experience different behavior with another module.


Previous page

Bookmark and Share