Hyper Open Edge Cloud

How To Use ERP5 RSS Skin

How To showing how to use ERP5 RSS skin to display a listbox as RSS 2.0 feed.
  • Last Update:2016-02-11
  • Version:001
  • Language:en

The RSS style, provided by erp5_rss_style business template can render any listbox in RSS 2.0 format. It can be used out-of-the-box to view content of any module or any form that provides a listbox with minimum defined by RSS 2.0 specification columns which are ['title', 'description', 'link']. In case listbox column definition fails to provide them system will try to automatically extract them in order to comply with RSS specification.

Table of Contents

Steps

There are two variants for using it:

  • using a dedicated form (form page template set to 'rss_view') which will unconditionally render itself as RSS. For example see Folder_viewContentListAsRSS. Then using url like:
        http://[host]/erp5/sale_order_module/Folder_viewContentListAsRSS
  • on any existing ERP5 form by dynamically changing skin to RSS in URL. URL would look like this:
        http://[host]/erp5/person_module/view?portal_skin=RSS

Integration with RSS reader

To use it in an RSS reader you have to provide login and password in the URL otherwise your reader will not be authenticated against ERP5. For example:

?__ac_name=[login]&__ac_password=[pass]

If dynamic way of rendering is used by setting portal_skin in URL sample URL would look like this (added additionally 'portal_skin=RSS'):

?portal_skin=RSS&__ac_name=[login]&__ac_password=[pass]

Customization

Overwrite Base_getRSSAuthor and Base_getRSSDescription to provide better information to the reader (remember to use html_quote() function whenever needed).

Related Articles