Skip to content
OpenCms documentation
OpenCms documentation

Lists and detail pages

With OpenCms you can collect contents in a list. This allows for example to show a list of the 10 latest news articles. Whenever a new article is published, the list is automatically updated. Moreover, editors can directly edit, add or delete news in the list.

Usually, articles in a list will only show a teaser or short version of the content. The complete content is then shown on a detail page that is linked from the list. One such detail page is sufficient for showing the information for all contents in the list. Detail pages will automatically have nice URLs, most often derived from the title of the content.

You can use this mechanism for other content types as well, e.g., event lists, blogs, etc. Lists also can support advanced features like interactive filters (for categories, full text search, ...), pagination or various sort options.

OpenCms provides a content type for lists in the core, that supports all the advanced features and also offers management of the list contents via a dedicated workplace app.

OpenCms ships with an integrated core list content type that allows you to build nearly all lists typically needed. It also supports management of list contents by a dedicated workplace app and allows for simple configuration of lists.

The tag <cms:simpleSearch> interacts with this resource type to generate the list output.

With OpenCms 15 the tag <cms:enable-list-add> was added. It can be used to add a "+" icon to the options of the list so you can add new contents to the list. This is in particular useful if you have empty lists, or lists that mix contents of different types, where it is not clear if the editor can press "+" for a content of the type he needs to create. The tag should be added to the formatter that renders the list. See the taglib documentation for details.

There is also a tag <cms:search> that allows to collect content directly from the Solr index, with advanced query options.

Since OpenCms 11 (editable) lists can be build with an integrated list type that allows for simple configuration and covers the most relevant features that are of interest when building lists of contents, e.g., for news, blog articles or events.

OpenCms 10 introduces a new way to build (editable) lists in a simple and very flexible manner. Here's an example providing a first impression of the new technique.

Up to OpenCms 10 content was collected via the <cms:contentload> tag. This is still supported, but no longer recommended as none of the advanced options of the modern lists are available.

Building lists of content items that are linked with its detail views is a common task when creating a website. OpenCms helps you to solve this task easily.

Learn by example how an editable list is created and links to detail pages are added.

Detail pages are a valueable feature especially in combination with lists. Read more about them in the following topics.

You need to link from a condensed view of your contents, e.g., in a list, to a page showing all the content's details? With OpenCms' detail page mechanism you create and configure only one page to get pages for all your contents automatically.