Templates, Section Pages and Content Pages
The ordinary section pages and content pages in a publication will
normally have the same top-level structure: a set of areas representing
the publication's overall graphical structure. A typical set of areas
might be Top
, Main
,
Right
and Bottom
:
Each of these areas may have an internal structure of groups and
areas. The Main
area of a section, for example, might
have a Top Stories
group and a Featured
Stories
group, each holding content items whose teasers are to
be placed in the main area of the page.
Templates have exactly the same structure as the section pages in
a publication, with the addition of a special area called
Meta
:
The Meta
area has no internal structure and is
used to hold "invisible" widgets. "Invisible" widgets affect how pages
work in some way, but do not occupy any physical space on the page. The
SEO
widget, for example, lets you add search engine
optimization data to the header of the rendered page, but does not
change its appearance.
The other areas of a template will usually have an internal
structure of groups and areas just like ordinary sections, but that
structure will often be quite different from the structure of
corresponding section pages. The Main
area of a
config.section.news
template, for example, is likely
to have a very different internal structure from the
Main
area of the news
section page
for which it provides layout.
The reason for this difference is that the purpose of the template
and the section page are very different. The purpose of the section page
is to allow an editor to create logical groupings
of content items. An editor might, for example, put the most important
items in a group called Top Stories
, and other items
that are to be featured on a page in a group called Featured
Stories
. The purpose of a template, however, is to define
physical page layout, so the groups available for
subdividing the main area are likely to reflect that, including
information about size and display style in their names:
Columns (720, 220)
, Tabs
and so
on.
There is, in other words, no direct correspondence between the
groups in a section page and the groups in the templates that govern its
layout. In order for a content item that has been dragged into an area
on a section page to actually appear on the published page, it must be
explicitly selected by one of the widgets placed on
the template. For example, most of the widgets used for displaying
content items in section templates have a Group
name field that specifies the name of a section page group
from which content items are to be selected. They may also have other
properties for defining which specific content items are to be selected
from that group. The trailer
widget, for example, has
a Number of trailers property that specifies how
many content items you want to take from the top of the group.
The following picture shows how a trailer
widget called Section trailers
is used to display
content items on the News
section page of a
publication. The Section trailers
widget is placed
as the second widget in the config.section
template's Main
area, and is configured to select the
top four content items from a section page's
main-1
group:
For more information about this, and about widgets in general, see Widgets.