This is a component that allows you to process an xml news feed with anchor tags of the items returned in the result. You can state how many items you want returned in your result.
The parameters that you can send are:
MaxResults = Number of anchor tags to return SiteAddress = The RSS Feed URL Address HeadLine = The Headline you want displayed on top of the anchor tags LinkTxtLimit = The number of characters you want displayed in your link text
To execute, here's an example:
<cfinvoke component="ProcessRSS" method="GetRSS" returnvariable="TheResults">
<cfinvokeargument name="MaxResults" value="6"> <cfinvokeargument name="SiteAddress" value="http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml"> <cfinvokeargument name="HeadLine" value="Latest from the BBC">
</cfinvoke>
<cfoutput> #TheResults# </cfoutput>
#TheResults# will have the value of:
|| Latest from the BBC ||
The Headline is contained in a DIV tag with the class name of rssResultHeadline and the entire content is contained in a DIV tag with the class name of rssResult. Since the CSS is using class names you can invoke this component multiple times on the same page!
|