Naming Templates
How you name templates is very important, since it determines how they are used. The following names must be used:
config
-
config
is the container for all templates. It is itself a template, however, and should not contain any layout objects (groups and widgets). If you do put any layout widgets in it, they will not be used. config.default
-
The
default
template is used for all pages: section pages, article pages and topic pages. config.default.section
-
The
config.default.section
template is is used for all section pages. It is a child of theconfig.default
template. config.default.article
-
The
config.default.article
template is used for all content pages. It is a child of theconfig.default
template. config.default.topic
-
The
config.default.topic
template is used for all topic pages. It is a child of theconfig.default
template. config.default.section.
section-name-
There can be many such templates, where section-name is the unique name of a particular section in the publication. The template will then be used for this particular section. It is a descendant (child, grandchild etc.) of the
config.default.section
template. config.default.article.type.
type-name-
There can be many such templates, where type-name is the name of one of the publication's content types. The template will then be used for content items of this particular type. It is a child of the
config.default.article
template. config.default.article.
section-name-
There can be many such templates, where section-name is the unique name of a particular section in the publication. The template will then be used for content items belonging to this particular section. It is a child of the
config.default.article
template. config.default.article.
section-name.type.
type-name-
There can be many such templates, where section-name is the unique name of a particular section in the publication and type-name is the name of one of the publication's content types. The template will then be used for type-name content items belonging to the section called section-name. It is a child of the
config.default.article
template. config.default.topic.
section-name-
There can be many such templates, where section-name is the unique name of a particular section in the publication. The template will then be used for topic pages belonging to the section called section-name. It is a child of the
config.default.topic
template. config.default.master.
master-template-name-
There can be many such templates, each defining a master template. A master template contains a template fragment that can be re-used in other templates. It is a child of the
config.default
template. You can give a master template any name you choose. For more detailed information about master templates, see Master Templates.
This means that the layout of a section called
news
, for example, will be based on the layouts in
the templates config
,
config.default.section
and
config.default.section.news
(if it exists).
Similarly, the layout of a content item belonging to the content type
story
will be based on the layouts in the templates
config.default
,
config.default.article
and
config.default.article.type.story
(if it exists). If
there is a template called
config.default.article.news.type.story
, then any
story
content items belonging to the
news
section will use this template instead of
config.default.article.type.story
.