Special Section Templates
How to use the templates for section homepages with feature stories, such as the FlexibleSection and RegionNew templates.
Intro and Examples
At the time of writing, there are three templates that are specially
made for rich section homepages that display feature stories, with
thumbnails, in the main content area. These are the FlexibleSection
template, used for the homepages of sections like the Agriculture Campaign and the Tsunami emergency; the RegionNew template, used for
the East Asia regional page; and the FastSection
template, used (surprise) for the homepage of the Fast section
[XXX:link when live]. Each of these templates must be manually applied
to content [XXX:link to interface explanation], which requires admin
privileges, so if you aren't a site admin you should get one to help
you set this up.
Like pretty much all other pages on the site, these templates each
have an intro box containing the description, a main content column,
and a sidebar column. What they all have in common is the ability to
add dynamic (i.e. automatic) features into the content column, which
I'll address in a sec; but first I'll go through the special features
of each template.
FlexibleSection
The FlexibleSection
template is applied with the IFlexibleSection interface. It's the most
widely used of these three templates, and can be used for Campaign,
Emergency, or other sections.
- Flexible Section looks exactly like a Campaign or Emergency template, with the addition of the thumbnail features.
- Sidebars work as normal. The bottom of the first sidebar will
always line up with the bottom of the intro box, so the page will look
best when these are about the same height.
- The color of the intro box is determined by the content type you apply this template to: Emergencies and Issues get the dark gray box, everything else gets the orange box.
- There will be a dotted line between the content and the features if
and only if you use the feature_stories topic (see below). Otherwise,
you need to add the dotted line into the page content if you want
it.
RegionNew
The RegionNew template is
an improved template for the homepages of the Regional sections. It's
applied with the IRegionNew interface.
- The Title goes into a green box that's shorter than normal. The Description is not shown in this template.
- The map in the sidebar, which crosses over into the title box, is determined by the id of the folder this page is in - so if you put it in a folder with the id "united_states", the US map will show up, and so forth. This assumes that the current ids of the regional folders won't change - if they do, the box will just be green, with no map.
- The main feature is the first of the featured items. There are three possible layouts for this feature: horizontal, vertical, and panoramic. The system will choose which layout to use based on the dimensions of the image associated with the first feature. Because this feature uses a non-standard size image, it's best to make this Sidebar Text [XXX: link to sidebar howto] instead of pointing directly to the item - if you associate a large image with a News Update, for example, it might turn up elsewhere where you neither expect nor desire it.
- Only 5 subfeatures will be shown in the content column.
- The sidebar column isn't actually sidebars at all - it's really the Body Text of the page. This gives you a lot of flexibility in terms of what appears in that column.
FastSection
The FastSection template is only used in on one page, the main page of
the Fast section. It works more or less like the FlexibleSection,
above:
- The top image and the Fast logo are added automatically.
- Sidebars work as normal. The bottom of the first sidebar (not counting the Fast logo) will line up with the bottom of the intro text.
- You won't get any dotted line or title between the Body Text and the features - you'll need to put whatever you want into the Body Text.
- The first three features are shown as usual, with thumbnails. After
that, there's a dotted line, and any other features are shown without
images, in a simpler manner; if these lower features have the "Blank"
viewlet, they won't be linked.
Working with Features
Features work more or less the same way on all of these templates.
It's a little complicated, but it gives you a real range of flexibility
in how these get shown. Main points:
- At the moment, all features are shown the same way, regardless of viewlet, content type, etc, with a title, blurb, thumbnail if available, and a little green arrow at the end.
- There's no way to put content under the features. Sorry.

Example of a feature with title, blurb, thumbnail, and
arrow.
For each of these templates, there are two ways to select features:
the Topic method and the Composite method. If you try to combine them,
the Composite method will override the Topic method.
The Topic Method
The Topic method is the simplest way to add features. It's a good
idea if you want features that are automatically updated with the
latest stories, and are happy with chronological order. Here's how it
works.
- Make a Topic in the same folder as the page with the Short Name "feature_stories". It must have this Short Name, or this won't work.
- Give it the Title you'd like to see on the page, such as "Feature Stories" or "Latest News".
- The page will usually default to showing 3 features. If you want to
show more or fewer, put the number you want in the Number of Items
field (it doesn't matter whether you check the Limit checkbox).
- Write a script to show the articles you want, such as the latest News Updates and Feature Stories associated with a specific Campaign.
- Save the Topic.
- Preview your page. The top articles returned by the Topic should
appear as features on the page, with the title of the Topic above them.
There should be a "more stories" link at the end of the list of
features (assuming there are more results than you can see).
- You might want to put the INavigationExclude interface on the
feature_stories Topic, unless you actually want it to show up in the
navigation.
The Composite Method
When I say "composite," what I mean is the Design view, where you
can select specific content and move it around - this is how you edit
Sidebars [XXX:link], and it can also be used for other elements on the
page. This is a good method if you want more control over what items
are displayed in what order - but it also means that you'll need
to update this page manually every so often.
- Go to the Design tab of the page.
- In the green bar, next to the Add New Item and State menus, there should be a Layout menu, with "sidebar layout" selected.
- Use this menu to select "section layout" (for the FlexibleSection and FastSection templates) or "region page layout" (for the RegionNew template).
- The page will reload, and now you'll have a "Features" slot in the main content column.
- You can add and edit items here just as you do with Sidebars [XXX:link again]. All items will show up in the feature format.
- Things work differently if you add a Topic, though. If you add a Topic, each result from the query will be shown as a feature. If you put a number into the Number of Items field of the Topic, only that number will be shown. If you don't put a number there, all of the items will be shown, which is rarely what you want - be careful!
This method allows you to pick specific features, or to pick a Topic
not called feature_stories, or to combine these options. See the chart
below for some examples of how this plays out.
