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 tag pages. It is, as its name suggest, the root of the default template tree. You can create other template trees for special purposes (see Multiple Template Roots (Content Profiles)). 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.tag
-
The
config.default.tag
template is used for all tag 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.tag.scheme.
tag-structure-name-
There can be many such templates, where tag-structure-name is the name of a particular tag structure used in the publication - for example,
config.default.tag.scheme.places
. The template will then be used for tag pages belonging to the specified tag structure. It is a child of theconfig.default.tag
template. config.default.tag.
tag-structure-name.
tag-term-
There can be many such templates, where tag-structure-name is the name of a particular tag structure used in the publication, and tag-term is the term of a tag in that structure - for example,
config.default.tag.places.bangladesh
. The template will then be used for that specific tag's tag page. It is a child of theconfig.default.tag
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
will be based on the layouts in the templatesconfig
,config.default.section
andconfig.default.section.news
(if it exists). -
The layout of a content item belonging to the content type
story
will be based on the layouts in the templatesconfig.default
,config.default.article
andconfig.default.article.type.story
(if it exists). -
If there is a template called
config.default.article.news.type.story
, then anystory
content items belonging to thenews
section will use this template instead ofconfig.default.article.type.story
. -
The layout of a tag page for the
countries
tagbangladesh
will be based on the layouts in the templatesconfig.default
,config.default.tag
,config.default.tag.scheme.countries
(if it exists) andconfig.default.tag.countries.bangladesh
(if it exists).