Skip to main content
Inspiring
July 16, 2008
Answered

Random RSS Feeds

  • July 16, 2008
  • 1 reply
  • 481 views
I have a small ColdFusion widget which I am able to use to collect RSS feeds and display them randomly. Everything is working okay except for the discription. I am getting the same desdription for each item with the same array key. I am only getting the first one in the array. It is not looping properly to give me the correct discription. The title is correct but not the description. I have attached the Application.cfm page and the widget utility.cfm.
You can see what is coming back by looking at http://newsite.websbygeorge.com/utility.cfm
You can see a dump of the ARRAY APPLICATION.RSSFeed by looking at
http://newsite.websbygeorge.com/test.cfm
This topic has been closed for replies.
Correct answer -__cfSearching__-
murpg wrote:
> APPLICATION.ParsedRSS[RandomFeed].rss.channel.item.description.xmltext
> APPLICATION.ParsedRSS[RandomFeed].rss.channel.item[RandomPick].link.xmltext)#

Perhaps you are missing the [RandomPick] index for description

1 reply

-__cfSearching__-Correct answer
Inspiring
July 16, 2008
murpg wrote:
> APPLICATION.ParsedRSS[RandomFeed].rss.channel.item.description.xmltext
> APPLICATION.ParsedRSS[RandomFeed].rss.channel.item[RandomPick].link.xmltext)#

Perhaps you are missing the [RandomPick] index for description
Inspiring
July 16, 2008
Your test site is down. (The joys of posting a URL on a forum.)

If you look at this:
<cfset RandomPick = RandRange(1, Arraylen(VARIABLES.LocalRSS[RandomFeed].rss.channel.item))>

One would probably quess that Arraylen(VARIABLES.LocalRSS[RandomFeed].rss.channel.item) is equal to 1.
You should dump the result of Arraylen(VARIABLES.LocalRSS[RandomFeed].rss.channel.item) and see what the arraylen is.

Without seeing your XML it's hard to venture a guess.