The List template displays a list of articles or media items, in a number of columns, on either a single page or across multiple pages.
Page Title and Content
The page title and content, including inline elements, appear at the top of each page of the list, as per the Default template.
List Items
All of the behaviour of the list is set up in the article extras.
You can choose which items will be included in the list, including:
- Articles in feature groups related to the list
- Child articles of the list
- Articles related to the list
- Articles that are tagged with the same metadata values as the list (this is useful if you want to build an A to Z)
Items in the list can be set up to display in a single or multi column layout. They can be ordered, ascending or descending, by title, last modified date, created date, display start date or by the manual ordering of items following the structure of the iCM article tree. The number of items per page can also be set.
Article List Item Behaviour
A standard article list item (for example, an article in the list that uses the default template) displays the article's title, followed by a summary. The article heading text can be overridden by the article's alternate link text. The summary will be the article's summary text, if available, or the introductory text. If neither summary nor introductory text are available, no summary will be output.
Should the article have a related image, a suitably sized version will be displayed. The image will generally appear to the left of the article text when in a single column, above when in two or more columns, however this will depend on your website's theme.
The title, image and summary all act as a link to the article.
Media List Item behaviour
Media items display an icon identifying the document type, or a suitably sized rendering of the image in the case of listed image items. The size of these icons and images are set by your website's theme.
Beneath the image or document icon is the media item's title and description, as entered in the media library.
Beneath the description are links to the media item. A link will be output for each component of the media item. In the case of document type media items, the component name, followed by its size in square brackets will act as the link. For image type media items, the dimensions of each variant followed by its size in square brackets will act as the link.
Lists within Lists
An article in a list could be another article using the List template. The article extras of the List template control how it will behave if it appears in another list.
Most elements are the same as any other article. If the article has a related image, a suitably sized version will be displayed. The size and position of this image is determined by your website's theme. The heading or alternate link text of the listed article will act as a link to that page.
You can pick whether the listed article displays:
- A number of items from its own list (as in the screenshot above)
- Its summary (just like the Default template)
- Both
Page Navigator
If there are more items in the list than will fit on a single page, a page navigator is displayed. The navigator displays "Previous" and "Next" links, and up to twelve page numbers.
Each number acts as a link to that page of the list. The current page number is highlighted and does not act as a link. On the first and last pages of the list, the "Previous" and "Next" links of the navigator are disabled respectively.
Links to the first and last page in the list are always visible. The ten middle numbers will scroll to the right once the mid point of the visible pages is reached. Scrolling will stop when the last page number appears on the right, then the highlighting will walk to the right until the last page is reached.
At widths below 780px the "Next" and "Previous" button text is replaced with arrow icons. The navigator will attempt to remain on one line as far as possible and hide page links with ellipsis to achieve this. Where links have been replaced with ellipsis a toggle button will appear that can show the hidden pages (this will cause the component to use two lines).
This image shows a large list with the user viewing page 1:
As you navigate through pages, the central numbers being to walk forwards:
These two images show the navigator at mobile width. The links hidden by ellipsis can be toggled open or closed:
Related Assets
Should they not be configured to form part of the list, related assets such as media items, links, and features, will appear as per the Default template.
RSS Mode
An article using the List template can be configured to display a link to an optional RSS feed of the articles found in the list.
The link to the feed is styled as a button, positioned between the main page content and the list items. The button has the text "Subscribe to <article heading> feed".
When clicked the user will be taken to the RSS version of the list. They can then use this URL to add the feed to their preferred RSS reader.
<rss xmlns:a10="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>List Example</title>
<link>http://gossinteractive.com/article/484/List-Example</link>
<description>Introductory text</description>
<item>
<guid isPermaLink="false">1181</guid>
<link>http://gossinteractive.com/article/1181/Test-Article-2</link>
<title>Test Article 2</title>
<description>This is the article intro text</description>
<a10:updated>2017-08-22T11:03:09+01:00</a10:updated>
</item>
</channel>
</rss>
The feed is made up as follows.
The channel title, link and description are taken from the list article, the item elements from each article in the list. The descriptions use the article introductory text, which can be overridden by summary text as normal.
Note that an RSS feed can only be generated if there are no media items included in the list.
Creating a List
Selecting the List Items
The items that appear on an article using the List template are controlled by the article's extras.
Article List Items
The articles that can be displayed in the list are:
- Articles that are members of feature groups that are related to the list article, provided that the "Include related features" option is set to Yes
- Articles that are children of the list article, provided that the "Include child articles" option is set to Yes. Note that by default, if a child articles are displayed in the list, they won't appear in the site navigation (to avoid duplicate links to the same content). This behaviour can be changed using the "Child articles in navigation" drop-down
- Articles that are related to the list article, provided that the "Include related articles" option is set to Yes
- Articles that share the same metadata as the list article, provided that the "Include metadata articles" option is set to Yes
Media List Items
The media items that are displayed in the list are:
- Media items that are related to the list article, provided that the "Include related media" option is set to Yes
- Media items that share the same metadata as the list article, provided that the "Include metadata media" option is set to Yes
Note that if media items are in the list, the RSS options will be disabled.
List Paging, Layout and Ordering
The article extras also provide options for ordering, controlling the number of listed items per page, and the number of columns on a page.
Ordering
By default content within lists will be ordered by type: features, child articles, related articles, related media, metadata articles then metadata media. Items within each type are ordered as they appear in iCM. For example, a list that displays related features and child articles will first display all related features, with the articles in those feature groups ordered as they are in iCM, then all child articles, ordered as they are in iCM.
Items per Page
Any number of items can be configured to appear on the page. If there are more items in the list than will fit on a single page, paging and the page navigator are automatically enabled.
Number of Columns
List items can be displayed in one to four columns.
Summary Display
It is possible for an article using the List template to appear in another list. When this happens the listed article can either display its own summary, or its own list items. If "Display first N listable items" is chosen, the number entered into the "Max items to display" box controls the number of links to list items that will appear.
RSS
If "Display RSS" is set to Yes a link to an RSS feed will be displayed on the article. The items in the list can be ordered by last modified date, created date, or display-start date. All ordering options display the most recent article first.
The number-input field lets you set the number of items that will appear in the feed. A minimum of five and maximum of fifty have been configured in the LISTX form.
Article Extras
Field Name | Type | Description |
---|---|---|
INCLUDERELATEDFEATURES | Drop-down | If yes these will be included in the list |
INCLUDECHILDARTICLES | Drop-down | If yes these will be included in the list |
CHILDARTICLESINNAV | Drop-down | Chose between "hide", "show" and "showothers" |
INCLUDERELATEDARTICLES | Drop-down | If yes these will be included in the list |
INCLUDERELATEDMEDIA | Drop-down | If yes these will be included in the list |
INCLUDEMETADATAARTICLES | Drop-down | If yes these will be included in the list |
INCLUDEMETADATAMEDIA | Drop-down | If yes these will be included in the list |
ORDERING | Drop-down | The order of the list items. One of NATURAL, HEADINGASC, HEADINGDESC, MODIFIEDASC, MODIFIEDDESC, CREATEDASC, CREATEDDESC, DISPLAYSTARTASC, DISPLAYSTARTDESC |
ITEMSPERPAGE | Number | The number of items per page |
COLUMNS | Drop-down | Number of columns. 1-4 |
SUMMARYMODE | Drop-down | How this list will behave in another list |
SUMMARYMAXITEMS | Number | The number of items to display when included in another list |
DISPLAYRSS | Drop-down | If yes the RSS link will be displayed |
RSSORDERING | Drop-down | The order of the items in the feed. One of MODIFIEDDESC, CREATEDDESC, DISPLAYSTARTDESC |
RSSCOUNT | Number | The number of items in the feed |