The XML definition of a page model is constituted in the following manner:
- XHTML code will be included in the pages of the site using this model.
- XML code defines the logical areas in which Autmone will work.
There are three principle types of XML tags in the page models:
- atm-linx : creates navigation links between Atomne pages.
- atm-clientspace : defines content zones.
- Other tags : recover information about the page (title, metadata, etc.)
A model can contain the following XML tags:
Page title:
<atm-title />
Self-closing non-attributed tag: It will be replaced by the page title field.
Page metadata:
<atm-meta-tags />
Self-closing non-attributed tag: It will be replaced by the metadata fields.
This tag is obligatory, it must be located in the tag <head> of your XHTML model because it manages certain functions of Automne. It is this tag, for example, that activates the page editing functions. It adds javascripts to the style sheets furnished by the different modules which will be employed in these pages.
This tag generates the following metadata:
Name | Metadata | Possible Values |
---|---|---|
Description | <meta name="description" content=" " /> | Open |
Keywords | <meta name="keywords" content=" " /> | Open |
Category | <meta name="category" content=" " /> | Open |
Robots | <meta name="robots" content=" " /> | (all, index, follow, noindex, nofollow ) |
Language | <meta name="language" content=" " /> | Open |
Author | <meta name="author" content=" " /> | Open |
Copyright | <meta name="copyright" content=" " /> | Open |
Navigator cache | <meta http-equiv="pragma" content="no-cache" /> | Applied only if this option is checked |
Generator | <meta name="generator" content="Automne" /> | Automatic |
Call scripts tag <atm-js-tags />
<atm-js-tags files="/js/js1.js,/js/js2.js" />
This tag concatenates several javascript files in one, thus accelerating the loading of your web pages.
The files listed this way will be concatenated and compressed before being served to the internaut. An advanced management of the navigator cache is employed.
- Files attribute: Javascript files are included in the page (separated by commas).
The files to be used must be located in the directory or sub-directory of /js/.
Example :
<atm-js-tags files="/js/jquery.js,/js/common.js" />
In development, as long as the "activate system debugger" parameter is active, Javascript minimization is not performed; thus it is possible to run the Javascript code more easily.
On the contrary, in production, as long as the "activate system debugger" parameter is inactive, minimization results in btter performance.
Call style sheets tag <atm-css-tags />
<atm-css-tags files="/css/css1.css,/css/css2.css" />
This tag concantenates several file sheets files into one, thus accelerating the loading of your web pages.
The files listed this way will be concatenated and compressed before being served to the internaut. An advanced management of the navigator cache is employed.
- Files attribute: CSS style sheets are included in the page (separated by commas).
- Media attribute (optional): specifies the media output employed, among them:
- all (by default if the media attribute is not employed)
- aural
- braille
- embossed
- handheld
- projection
- screen
- tty
- tv
The files to be used must be located in the directory or sub-directory of /js/.
Example :
<atm-css-tags files="/css/common.css,/css/accueil.css" />
Page client spaces:
<atm-clientspace id="identifiant" module="codename" />
Self-closing tag. It has the following attributes:
- id: unique identifier of the model's client space. You can put whatever alphanumeric value you want as long as it is unique among all the atm-clientspace tags of the model.
- module: defines which module will supply the content of the client space. By default, if you wish to be able to insert content rows in this client space, you must specify a "standard" value.
This tag defines the position of a client space in the page. It is this tag that makes it possible to insert content rows in the pages which will be created from this model.
Example : <atm-clientspace id="left-column" module="standard" />
PHP constants :
<atm-constant name="constant" />
Self-closing tag. It has the following attributes:
- name: name of the constant that must be returned.
This tag allows you to obtain the value of every PHP constant.
Example : <atm-constant name="APPLICATION_LABEL" />
This code will return the name of the constant APPLICATION_LABEL which in Automne is the name of your instance of Automne.
Link to print page:
<atm-print-link keeprequest="true"> ... {{href}} ... </atm-print-link>
This tag has the following attributes:
- keeprequest: this attribute is optional and sends the GET and POST values of the current page to the print page. Accepted values: true or false (default).
This tag will replace the following special value:
- {{href}}: address of the print page for the current page.
This tag creates a link towards the print page (if it exists) for the current page.
Example : <atm-print-link><a href="{{href}}">Imprimer</a></atm-print-link>
Date of the latest page update:
<atm-last-update format="m/d/Y H:i:s"> ... {{date}} ... {{firstname}} ... {{lastname}} ... </atm-last-update>
This tag has the following attributes:
- format: Format of the date display according to date format of PHP.
This tag will replace the following special values:
- {{date}} : Date of the latest page update in the format specified by the format attribute.
- {{firstname}}: First name of the user who made the last page modification.
- {{lastname}}: Last name of the user who made the last page modification.
This tag displays the date or the author of the latest update of the current page.
Exemple :<atm-last-update format="m/d/Y H:i:s"><small>Dernière mise à jour : {{date}} par {{firstname}} {{lastname}}</small></atm-last-update>
Identifier of the current page: 339
This value will be replaced by the identifier of the page you are on.
PageID is very useful for finding the identifier of the page you are on.
A simple example of an XML model code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title><atm-constant name="APPLICATION_LABEL" /> : <atm-title /></title>
<atm-css-tags files="/css/common.css,/css/index.css" media="screen" />
<atm-css-tags files="/css/print.css" media="print" />
<atm-meta-tags />
<atm-js-tags files="/js/sifr.js,/js/common.js,/js/jquery-1.3.2.js,/js/menu.js" />
</head>
<body>
<h1><atm-title /></h1>
<div>
<atm-clientspace module="standard" id="center" />
</div>
<br /><br />
<atm-print-link keeprequest="true"> <a href="{{href}}" target="_blank">Print</a></atm-print-link><br />
<atm-last-update format="m/d/Y H:i:s"><small>Last update : {{date}} by {{firstname}} {{lastname}}</small></atm-last-update>
</body>
</html>
This simple example gives us a model that could be employed to create pages in which it is possible to insert content rows.
On the other hand it lacks a system of links allowing navigation between the different pages thus created.