• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Random RSS Feeds

Participant ,
Jul 16, 2008 Jul 16, 2008

Copy link to clipboard

Copied

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
TOPICS
Advanced techniques

Views

381

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Jul 16, 2008 Jul 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

Votes

Translate

Translate
Valorous Hero ,
Jul 16, 2008 Jul 16, 2008

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 16, 2008 Jul 16, 2008

Copy link to clipboard

Copied

LATEST
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation