News feed

This feature is available in Contao 5.3 and later.

This page type creates an RSS, Atom or JSON feed from your news archives.

Each news or blog archive can be exported as an RSS, Atom or JSON feed if desired. Feeds are XML and JSON files with your posts that can be subscribed to with an RSS reader and integrated into another website, for example.

The feeds can be integrated via the page layout in the header area of the page. By “header” we do not mean the header of your page layout, but the head tag of the HTML source code.

Name and type

Page name: The page name is displayed in the navigation and used as a fallback for the page title.

Page type: Here you can define the type of page.

Routing

Page aliases: The alias of a page is a unique and meaningful reference that you can use to access a page in your browser. If you leave this field empty when creating a page, Contao will automatically generate the alias.

News archives

News archives: Here you define which news archives are included in the feed.

Feed settings

Feed format: Here you can define the format of the feed. Contao supports the following formats: RSS 2.0, Atom, and JSON.

Export settings: Here you can specify whether only the teaser texts of the posts or the complete posts are exported as feed.

Maximum number of contributions: Here you can limit the number of posts of the feed. Usually about 25 posts per feed are sufficient. Most of the time only the first three to five are actually used anyway.

Featured items: Here you can specify whether all, only featured or only non-featured items from the selected archives are displayed.

Feed description: Here you can enter a description of the feed.

Image settings

Image size: Here you can specify the desired image size. You can choose between the following scaling modes:

Relative format
ProportionalThe longer side of the image is adapted to the given dimensions and the image is proportionally reduced.
Fit to frameThe shorter side of the image is adjusted to the given dimensions and the image is proportionally reduced.

 

Exact format
Important partPreserves the important part of the image as specified in the file manager.
Left / TopPreserves the left part of a landscape image and the upper part of a portrait image.
Middle / TopPreserves the central part of a landscape image and the upper part of a portrait image.
Right / TopGet the right part of a landscape image and the upper part of a portrait image.
Left / MiddlePreserves the left part of a landscape image and the center part of a portrait image.
Center / CenterPreserves the central part of a landscape image and the central part of a portrait image.
Right / MiddlePreserves the right part of a landscape image and the center part of a portrait image.
Left / BottomContains the left part of a landscape image and the lower part of a portrait image.
Middle / BottomPreserves the central part of a landscape image and the lower part of a portrait image.
Right / BottomPreserves the right part of a landscape image and the lower part of a portrait image.

Cache settings

In the cache settings you can define if and how long a page should be cached. Cached pages load much faster because they do not have to be generated by Contao and they do not need a connection to the database for delivery.

Set cache timeouts: Here you can assign a cache time to a page. If you do not select this option, the cache settings are inherited from a parent page.

Private cache timeout (Client cache timeout): Allows you to assign a cache time to a page. This sets the time in seconds after which the browser will consider the page out of date.

Shared cache timeout (Server cache timeout): Here you can assign a cache time to a page. This defines the time in seconds after which the page is considered obsolete by a shared cache.

Note that for security reasons, pages are only cached if they are not protected and no user is logged on to the back end. Otherwise, there is a risk that confidential data is written to the cache and accidentally displayed in the front end. So don’t be surprised if your password-protected pages don’t show up in the cache despite their assigned expiration time.

Always load from shared cache: Always load this page from the shared cache, even if a member is logged in. Note that in this case you will not be able to personalize the page for logged in members.

Expert settings

CSS class: Here you assign a CSS class to the page, which is used in the body tag of the HTML page as well as in the navigation modules. This way you can create CSS formatting for a specific page or menu item.

Show in HTML sitemap: Here you can determine whether the page is displayed in the HTML Sitemap. By default, all public pages and pages not hidden in the menu are included. If necessary, this behavior can be adjusted per page:

  • Default: Use the default settings.
  • Always display: The page is always displayed in the HTML Sitemap, even if, for example, it is hidden in the menu and would not normally be displayed.
  • Never display: The page is excluded from the HTML Sitemap.

Do not confuse the HTML sitemap with the XML sitemap: The HTML sitemap is a FE-Module, you can submit the XML sitemap e.g. to Google.

Hide in menu: If you select this option, the page will not be displayed in the menu of your website, but you can still access the page - if it has been published - via a direct link or in a front end module.

Contao indexes the finished pages of your website and creates a search index that you can search with the front end module “search engine”. With this setting, you can exclude certain pages from the indexing process. In the back end settings, you can also disable the search function completely.

Do not search: Here you can exclude a page from the search.

Publication

As long as a page is not published, it practically does not exist in the front end and cannot be accessed by visitors. In addition to manual publishing, Contao also offers the possibility to activate pages automatically on a specific date. This way you can, for example, apply for a limited time offer.

Publish page: Here you can publish a page.

Show from: Here you activate a page on a specific date.

Show until: Here you deactivate a page at a certain date.