Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsNews FeedsNews Feedsproblem with number of items in a feedproblem with number of items in a feed
Previous
 
Next
New Post
4/7/2007 1:42 AM
 

I know how to set the limit of a news feed to display 25 items (when the original source has 100 items. )

However, my problem is when I tried to display feeds from google's news feeds, they only show 10 items eventhough I did not set any limit (and I know they contain more because when I use explorer7 to display the feed, it displays as much as 50.)

To give a real example...

http://news.google.ca/news?hl=en&ned=ca&q=hockey&ie=UTF-8&output=rss

If you view this news feed with IE7, 50 items will show up.  (Beaware that you may need to set your IE7 browser to display 50 items or else it may also only display 10 items.)   However, if you view this using the dnn news feed, only 10 items will show up... and I can't figure out how to tell dnn news feed to display 50 items..

Anyone know how to solve my problem?  Thanks

 

 
New Post
4/8/2007 12:59 AM
 

Well, first off, you might want to define what xsl you are using, and show the relevant code you are using to limit the number of feeds.  When I clicked the link you provided, it only brought up 10 items in IE7.  I reset the value, and I could get more, but that's really a function of the method IE7 is using to control the feed.  Sometimes you will not get more items, despite setting a higher limit, due to IE7 only using the newer limit when the feed is actually refreshed.

Now, in DNN, the default news xsl is an older v0.91 xsl compatible transformation with no way to limit the number of feeds, or display HTML encoded content, or any number of other RSS v2.0 or other RSS flavors, such as ATOM, FeedBurner, or RDF feeds.  Those require custom xsl files.  In my RSS usage, I've encountered some feed providers that you call for an included number to use to set the number of retrieved items, but generally, when using the default xsl in dnn, it brings back as many items as are delivered from the source.

Give an example of the xsl you are using, and maybe we can sort this out...

 
New Post
4/8/2007 8:55 AM
 

iwonder wrote

Give an example of the xsl you are using, and maybe we can sort this out...

Thanks for your reply.  The specific part I use in my xsl (for  the complete xsl, scroll to the bottom) that wil limit the number of items displayed is <xsl:for-each select="channel/item[position() &lt; 4]">

It will limit the number of news items to 3... so if you apply this xsl to the google feed in my original post, you will only see 3 items instead of the usual 10 items (if I did not set the limit and just let it loop til the end by using <xsl:for-each select="channel/item">).. 

My problems is that I want to display 50 items (and I know it can be done because IE7 can display 50 items using the same google feed).  When I use <xsl:for-each select="channel/item">, it only displays 10 items.  So I tried to specifically tell it to display 50 items.  However, when I change the code to <xsl:for-each select="channel/item[position() &lt; 51]">, it still only display 10 items.

Any ideas?   Thanks.

___________________________

(below is the entire xsl)

 

<?xml version="1.0" encoding="utf-8"?>
<!-- Edited by Lee Sykes DNN Creative Magazine http://www.dnncreative.com -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<xsl:param name="TITLE"/>

<xsl:template match="rss">
  <!-- Do not show channel image -->
  <xsl:for-each select="channel/item[position() &lt; 16]">
    <br>
 <!-- to open links in a new window, change target="_main" to target="_new" -->
    <strong><a href="{link}" target="_new"><xsl:value-of select="title"/></a></strong></br>
    <br>
    <xsl:value-of select="pubDate"/>
    </br>
    <!-- only display markup for description if it's present -->
    <xsl:value-of disable-output-escaping="yes" select="description"/>
  </xsl:for-each>
  <br></br>
</xsl:template>

<xsl:template match="description">
  <br>
    <xsl:value-of select="."/>
  </br>
</xsl:template>

</xsl:stylesheet>

 

 

 

 

 
New Post
4/8/2007 12:50 PM
 

Yes, I understand what you mean, but I really think this is a problem with the newsfeed provider.  The default xsl in DNN does not limit the number of items retrieved, nor does the xsl that you referenced.  The number of items supplied is controlled by the news provider.  I know this is true because, I can browse to many newsfeeds that provide differing number of feed items.  IE7 has a way of storing the number of feed items based on some code and properties.  The number of items retrieved will vary depending on the setttings and the methods it uses to retrieve and cache the feed.

Try the default dnn feed, which I don't have a way to do, at this time (on my laptop, with no access to my dnn site).  I think you'll see one of 2 things.  Either Google feeds default to providing 10 items, or you'll get all that are available.  My gut level feeling is that they base what they provide based on some timed refresh, or the query string supplied.  Let me know what you find out in your testing.  I'll look a bit further tonight, after our holiday rounds.  Peace out...

 

 
New Post
4/8/2007 3:53 PM
 

iwonder wrote

\Try the default dnn feed, which I don't have a way to do, at this time (on my laptop, with no access to my dnn site).  I think you'll see one of 2 things.  Either Google feeds default to providing 10 items, or you'll get all that are available. 

I used the default dnn feed (hopefully, I did it correctly- I am assuming that the default is used when I first add a new newsfeed module without supplying it with a xsl file) and the result is that I get 10 items (in html coding).  Hopefully, you will get a chance to try it out too- cause I am not sure if I am correct in my assumption (that I am using the default if I don't supply it with a xsl).

I agree with you that this dnn newsfeed module works.  I tried it with other news feed and it displays all that is available. 

However, somehow I can't make it work (unable to display all the results available) for google newsfeeds... and google newsfeed is really helpful for the vistors to my website since google is so powerful and google can come up with so many results.  (displaying 10 items is just not enough)

Perhaps you are right that this is a problem with google's newfeed, but the thing that bothers me is that I can see IE7's newsfeed reader displaying it all (100 items- when I set the preference for 100)... so I find myself really wantting to make this google feed thing work.

Any more ideas I can try?  Thanks.

 

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsNews FeedsNews Feedsproblem with number of items in a feedproblem with number of items in a feed


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out