Templates for RSS Feed in Conversant

And, in case anyone cares, this is how I do RSS feeds for my topical-oriented pages in Conversant. I should emphasize that there are a number of different ways to do multiple RSS feeds in Conversant, and this is probably the most complicated. But it offers a number of advantages, including the fact that the results can be cached.

First I set up an Advanced Query page for each topic. If I were doing page on PETA, for example, I’d create an AQP called peta.rss, and then I’d assign it a page title of “PETA” and a navigation title of “PETA – RSS Feed.”

Then I configure the Query Options to search for bound URLs and set the cache period to 180 minutes (since I rarely make updates more than once or twice a day).

In the Query Defaults, I set the AQP to search for messages labeled as “Articles” and then only those messages where I’ve set the “Organization” custom field to “PETA.”

Here are the templates I then use in the Results tab to output an RSS channel:

Page Content Template



<b>[Site Name]</b> – <!--#pageTitle--> [Link to Topical HTML Page] RSS Feed of Articles about
en-us
Copyright 2002, Brian Carnell
[email protected] (Brian Carnell)

[email protected] (Brian Carnell)


 

Query Result Template

 

Message Template>


<!--#msgsubject striphtml="true"--> ” length=”125″ striphtml=”true”
adminLinks=”false”–>

So now, I’ve got an RSS feed. The next trick is to have the topical pages include both a link tag to that RSS channel in the header area, and also display an XML icon in the right hand-column.

To do this, I first created a Long Text custom field called “RSS.” When I’ve configured an RSS channel for a specific topical page, I just go back to that topical page, edit it, and then past the URL for the RSS channel into the text entry box for the “RSS” custom field.

Then I modified two templates. In the template I use to control the header information, I added this:

“>

This tests to see if the message in question has a value in the “RSS” custom field, and if so it grabs that and uses it in the link tag.

To get the XML graphic to display and link to the correct page I use this:


title=”RSS Feed for Stories about “>http://brian.carnell.com/wp-content/uploads/files/images/xml.gif
“>

Again, this tests to see if the message in question has a value in the “RSS” custom field, and if so it inserts the icon and grabs the “RSS” value for the link.

Leave a Reply