Documentation >> Macros >> RSSBox
Rendering RSS Feeds on Pages Served Through Conversant
Returns HTML formatted version of a publicly available RSS format syndication feed. The content of RSS documents are cached for performance reasons, but will be updated every hour.
(Technically, it doesn't have to return RSS. You have full control over what it returns via the macros and templates described on this page. HTML is simply the most common thing to return.
Required Attributes:
- url="[url to RSS document]" : The full URL to the RSS document you wish to be formatted by the macro.
Optional Attributes
- template="[string]" : Name of a template defined in the admin site's Template editor. This template is used for as the main template for the macro's content.
- itemTemplate="[string]" : Name of a template defined in the admin site's Template editor. This template is used for each repeating item in the RSS document.
- limit="[number]" : Maximum number of items from the feed to display. Defaults to no limit.
- username="[string]" : Username to use when downloading the RSS feed. See the password attribute for more info.
- password="[string]" : Password to use when downloading the RSS feed. Ignored if username is not provided.
Main RSS Body (Wrapper) Template
The following macros are supported within RSS Body templates ( used in the "template" attribute ):
- <!--#rssChannelTitle--> : returns Title value from RSS document. Supports optional attributes: link="true/false" (wrap title in anchor tag linking to rssChannelLink value ), urlencode="true/false" ( encode the value for use in a URL ), entify="true/false" ( entify special characters ).
- <!--#rssChannelDescription--> : returns Description value from RSS document. Supports optional attributes: urlencode="true/false" ( encode the value for use in a URL ), entify="true/false" ( entify special characters ).
- <!--#rssChannelLink--> : returns URL to channel page.
- <!--#rssModificationDate--> : returns last modification time of the RSS document. supports optional attributes to control string formatting: time="true/false" ( show time? ), longdate="true/false" ( show date as "January 1, 2000"? ), timezoneOffset="number of minutes" ( minutes to offset from GMT, ie, Eastern Standard Time would be "-360" )
- <!--#rssChannelUrl--> : returns the url of the RSS feed itself (the xml)
- <!--#rssItems--> : returns the body of items in the RSS document.
Item Templates
The following macros are supported within RSS Item templates ( used in the "itemtemplate" attribute ). Any of the main RSS body templates (above) can also be used.
- <!--#rssAuthor--> : returns the author of the item, if provided. Use the noValueText attribute for items that have no author element.
- <!--#rssCategories--> : returns the list of categories provided with the item, if any. This is a standard 'list' macro, supporting the optional attributes preWrapper, postWrapper, and separatorText.
- <!--#rssDescription--> : returns Description value for the item. Supports optional attributes: urlencode="true/false" ( encode the value for use in a URL ), entify="true/false" ( entify special characters ).
- <!--#rssGuid--> : returns the item's guid if there is one, or the noValueText attribute if there is one, or just an empty string.
- <!--#rssLink--> : returns Link value for the item. Supports optional attributes: urlencode="true/false" ( encode the value for use in a URL ), entify="true/false" ( entify special characters ).
- <!--#rssPermalink--> : returns the permalink value for the rss item, if one has been provided. Otherwise, returns the noValueText attribute or the empty string.
- <!--#rssPubDate--> : returns the publication date and tiem for the rss item, if one was provided in the rss. This is a standard date macro.
- <!--#rssTitle--> : returns Title value for the item, which is typically the content text for display. Supports optional attributes: urlencode="true/false" ( encode the value for use in a URL ), entify="true/false" ( entify special characters ).
- <!--#rssSourceChannelTitle--> : returns Title of the Channel that provided the source for the link. Supports optional attributes: link="true/false" ( wrap title in anchor tag linking to rssSourceChannelURL value ), urlencode="true/false" ( encode the value for use in a URL ), entify="true/false" ( entify special characters ).
- <!--#rssSourceChannelURL--> : returns URL to the source of the link.
View in DG
|