A graphic charter has one or more templates. Any page containing information is necessarily associated with a template. It is this template that displays the different parts of a page.

A template consists of :

  • static parts (general structure, page header and footer, for example)
  • dynamic parts (navigation, for example)
  • one or more zones for editorial content and/or services

In the example opposite, the different parts of the template are fed in 3 different ways:

  • in red: the main information at the heart of the page is content, placed and entered by the contributor.
  • in yellow: the word cloud and attachment display are generated by services, and the information is updated automatically, without the intervention of a contributor.
  • blue elements (menus, search engine) and green elements (breadcrumb trail, page header, share, print, translate buttons), as well as all static elements, are defined in style sheets common to several templates. The contributor can only act on blue elements via a set of labels. He cannot act on elements in green.

For more details on how to create a page, please refer to the user manual, page Create a page.

Defining a template in Ametys involves :

  • declare, in a XML file, the zones where contributors can insert their content and services (cms/skins/[skinName]/templates/[templateName]/template.xml),
  • compose static and dynamic parts of a page using templates XSL (cms/skins/[skinName]/templates/[templateName]/template.xsl)
  • define the rules for using this template and its zones in configuration files XML (cms/skins/[skinName]/templates/[templateName]/conf)

To find out more about creating a template, see Writing a template .

Zone inheritance

Content or services can be inherited from a parent page to its children. This parameter is specified in the definition of template zones (see template file.xml).

Template assignment rules

Template assignment rules can be defined to restrict their use. For example, a template designed specifically for the home page can only be assigned to a page whoseURL is /index.html. This restriction is managed by the template_assignment file .xml.

Style variations for the same template

Each template can have variations in style while retaining a similar layout.

Restriction of available content and services by template and zone

Each template can have from 0 to n display zones. Some zones are supplied with content types and/or services made available to the contributor. It is possible to restrict the types of content and services available by display zone and template. To find out more about restricting content and services by zone, see Template configuration.

Input Data

Some dynamic data are accessible via the template used. These can be used to build parts common to all pages, notably the breadcrumb trail; or to define page or content filters via a set of labels.

For more information, visit the Input Data page. 

 

Back to top