Fork me on GitHub

Usage

Introduction

In this section we'll go through an example setup of the plugin in an example project.

Create a new Feed Document: RSS, Atom or Generic

Add a new "Feed" document (aka descriptor) anywhere in your CMS.

  1. In the CMS, in the Content / Documents section, create a new folder called 'syndication'.

  2. In the folder 'syndication', create some documents of type 'RSS 2.0 Feed', 'Atom 1.0 Feed' or 'Generic Feed' fill it with dummy text.

    Note: the document names are very important to remember because they will be used later on when trying to get one of the feeds.

Screenshot 'Add new document'

Define Query parameters on your Feed Document

While you still have the Document open add query parameters on the right side of your document. Such as; document type, limit, etc etc.
Screenshot 'Add new document'

Create a sitemap item in your configuration

In order to make your feed findable you need to add a sitemap item to your configuration. Take a look at the example from the demo. The path of the sitemap item is feed/_any_.xml. Make sure to adjust this to your situation! Keep in mind that everything you change in the CMS console is case sensitive.

feed sitemap item example

feed sitemap item example detail

Create a link to the Feed Document

You could create a link to your Feed document from anywhere in your CMS.

Screenshot 'Add link'

HST will resolve the link to the Feed.

Admire the result: http://localhost:8080/site/feed/syndication/rss.xml

RSS feed example

Customization

Connect Beans with Entry information

Every Feed has one or more entries. RSS Channel has Items, Atom Feed has entries.

With the SyndicationElement annotation you can couple bean property methods with entry elements: see the NewsDocument bean from the demo .

Bean customization

This will result in the following:
Bean customization

Example of an Atom feed with the annotations:
Bean customization