Sample RSS Feed

Building an RSS feed is very straightforward in ColdFusion. The trick in FarCry Framework is knowing where to put the code. This example is taken directly from the Fullasagoog website.

https://gist.github.com/212554

A feed is essentially a collection of content items, for example blog posts. When you are thinking of a collection of objects you should be using a "type webskin" (aka a Collection or List View). The type webskin applies to the entire content type and not just an individual instance of that type.

Type webskins do not have the standard stobj property structure. They typically start with a call to the database for a group of content items. In this example we have a query inline that grabs relevant session objectids. You may want to encapsulate such a query in a function call.

Depending on your installation, you may need to ensure that the view feedRSS.cfm is actually visible to anonymous users. By default only views prefixed with display and execute are available. You can add the view to the anonymous role by logging into the webtop. Go to ADMIN > Roles > View permissions and add the feed* prefix to the list available.

1030 views and 0 responses