Re: Limiting RSS Records
cfif arraylen(objRSS.rss.channel.item) LT [insert limit here] cfset Item_Length = arraylen(objRSS.rss.channel.item) / cfelse cfset Item_Length = [insert limit here] / /cfif 2009/3/20 Steve LaBadie slaba...@po-box.esu.edu I am pulling an RSS feed from a 3rd party events calendar and want to limit how many events show on a page. The only control I have at the moment is to set the day_count which is currently set to 2. Any help/guidance would be appreciated. Here is my code: cfhttp url=http://esuevents.admin.esu.edu/r25ws/wrd/run/hot_event.xml?day_coun t=2otransform=RSSHotEvents.xslhttp://esuevents.admin.esu.edu/r25ws/wrd/run/hot_event.xml?day_coun%0At=2otransform=RSSHotEvents.xsl method=get/cfhttp cfset objRSS = xmlParse(cfhttp.filecontent) / cfset Item_Length = arraylen(objRSS.rss.channel.item) / cfloop index=i from=1 to=#Item_Length# step=1 cftry p class=eventsspan class=newstitle a class=eventlink a onClick=javascript:window.open('cfoutput#objRSS.rss.channel.item[i].l ink.xmltext#/cfoutput','Event','height=450,width=625,toolbar=no,menuba r=no,status=no,location=no,directories=no,titlebar=no,resizable=yes,scro llbars=yes'); return false; href=cfoutput #objRSS.rss.channel.item[i].link.xmltext# /cfoutput cfset pubdate = #objRSS.rss.channel.item[i].date.xmltext# / cfset date = #DateFormat(date,mm/dd/)# / cfoutput #date# /cfoutputbr / cfoutput #objRSS.rss.channel.item[i].title.xmltext# /cfoutput /a/spanbr / cfoutput #objRSS.rss.channel.item[i].space.xmltext#/cfoutput br /strong|/strong a href=cfoutput #objRSS.rss.channel.item[i].link.xmltext# /cfoutput class=eventlinkmore/a/p cfcatch type=any/cfcatch /cftry /cfloop Steve LaBadie, Web Manager East Stroudsburg University 200 Prospect St. East Stroudsburg, Pa 18301 570-422-3999 http://www.esu.edu slaba...@po-box.esu.edu ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320771 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Limiting RSS Records
2009/3/20 Steve LaBadie slaba...@po-box.esu.edu I am pulling an RSS feed from a 3rd party events calendar and want to limit how many events show on a page. The only control I have at the moment is to set the day_count which is currently set to 2. Any help/guidance would be appreciated. loop to whatever number you want to limit to, instead of #Item_Length# in your cfloop? -- I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320772 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Limiting RSS Records
Just change you loop to loop from 1 to your page limit instead of #item_length#. Then you'd have to handle the paging though. -Original Message- From: Steve LaBadie [mailto:slaba...@po-box.esu.edu] Sent: Friday, March 20, 2009 12:04 PM To: cf-talk Subject: Limiting RSS Records I am pulling an RSS feed from a 3rd party events calendar and want to limit how many events show on a page. The only control I have at the moment is to set the day_count which is currently set to 2. Any help/guidance would be appreciated. Here is my code: cfhttp url=http://esuevents.admin.esu.edu/r25ws/wrd/run/hot_event.xml?day_coun t=2otransform=RSSHotEvents.xsl method=get/cfhttp cfset objRSS = xmlParse(cfhttp.filecontent) / cfset Item_Length = arraylen(objRSS.rss.channel.item) / cfloop index=i from=1 to=#Item_Length# step=1 cftry p class=eventsspan class=newstitle a class=eventlink a onClick=javascript:window.open('cfoutput#objRSS.rss.channel.item[i].l ink.xmltext#/cfoutput','Event','height=450,width=625,toolbar=no,menuba r=no,status=no,location=no,directories=no,titlebar=no,resizable=yes,scro llbars=yes'); return false; href=cfoutput #objRSS.rss.channel.item[i].link.xmltext# /cfoutput cfset pubdate = #objRSS.rss.channel.item[i].date.xmltext# / cfset date = #DateFormat(date,mm/dd/)# / cfoutput #date# /cfoutputbr / cfoutput #objRSS.rss.channel.item[i].title.xmltext# /cfoutput /a/spanbr / cfoutput #objRSS.rss.channel.item[i].space.xmltext#/cfoutput br /strong|/strong a href=cfoutput #objRSS.rss.channel.item[i].link.xmltext# /cfoutput class=eventlinkmore/a/p cfcatch type=any/cfcatch /cftry /cfloop Steve LaBadie, Web Manager East Stroudsburg University 200 Prospect St. East Stroudsburg, Pa 18301 570-422-3999 http://www.esu.edu slaba...@po-box.esu.edu ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320773 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Limiting RSS Records
Thanks Everyone Steve LaBadie, Web Manager East Stroudsburg University 200 Prospect St. East Stroudsburg, Pa 18301 570-422-3999 http://www.esu.edu slaba...@po-box.esu.edu -Original Message- From: Burns, John D [mailto:john.bu...@wyle.com] Sent: Friday, March 20, 2009 12:19 PM To: cf-talk Subject: RE: Limiting RSS Records Just change you loop to loop from 1 to your page limit instead of #item_length#. Then you'd have to handle the paging though. -Original Message- From: Steve LaBadie [mailto:slaba...@po-box.esu.edu] Sent: Friday, March 20, 2009 12:04 PM To: cf-talk Subject: Limiting RSS Records I am pulling an RSS feed from a 3rd party events calendar and want to limit how many events show on a page. The only control I have at the moment is to set the day_count which is currently set to 2. Any help/guidance would be appreciated. Here is my code: cfhttp url=http://esuevents.admin.esu.edu/r25ws/wrd/run/hot_event.xml?day_coun t=2otransform=RSSHotEvents.xsl method=get/cfhttp cfset objRSS = xmlParse(cfhttp.filecontent) / cfset Item_Length = arraylen(objRSS.rss.channel.item) / cfloop index=i from=1 to=#Item_Length# step=1 cftry p class=eventsspan class=newstitle a class=eventlink a onClick=javascript:window.open('cfoutput#objRSS.rss.channel.item[i].l ink.xmltext#/cfoutput','Event','height=450,width=625,toolbar=no,menuba r=no,status=no,location=no,directories=no,titlebar=no,resizable=yes,scro llbars=yes'); return false; href=cfoutput #objRSS.rss.channel.item[i].link.xmltext# /cfoutput cfset pubdate = #objRSS.rss.channel.item[i].date.xmltext# / cfset date = #DateFormat(date,mm/dd/)# / cfoutput #date# /cfoutputbr / cfoutput #objRSS.rss.channel.item[i].title.xmltext# /cfoutput /a/spanbr / cfoutput #objRSS.rss.channel.item[i].space.xmltext#/cfoutput br /strong|/strong a href=cfoutput #objRSS.rss.channel.item[i].link.xmltext# /cfoutput class=eventlinkmore/a/p cfcatch type=any/cfcatch /cftry /cfloop Steve LaBadie, Web Manager East Stroudsburg University 200 Prospect St. East Stroudsburg, Pa 18301 570-422-3999 http://www.esu.edu slaba...@po-box.esu.edu ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320777 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4