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 FeedsIs it possible to limit the number of results?Is it possible to limit the number of results?
Previous
 
Next
New Post
1/25/2008 2:32 PM
 

Is it possible to display, say, the top 3 or so news bits without displaying everything from a feed?


Best Regards, KnuckleHead http://myinternetfunnies.com
 
New Post
1/25/2008 3:10 PM
 

Here's an example XSL that can limit entries, though this was for a Flickr feed, you can modify it to use for news feeds/rss

 

  <?xml version="1.0" ?>
- <xsl:stylesheet version="1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" indent="yes" />
  <xsl:param name="TITLE" />
- <xsl:template match="rss">
- <table cellpadding="0" width="100%" cellspacing="0" border="0" class="tableBorder" style="text-align:right;clear:both;">
- <tr>
- <td class="fh">
- <xsl:for-each select="channel/item[position() < 11]">
- <a href="{link}" target="_blank" style="text-decoration:none;">
- <img border="0">
- <xsl:attribute name="src">
  <xsl:value-of select="substring-before(substring-after(description,'src="'),'"')" />
  </xsl:attribute>
- <xsl:attribute name="border">
  <xsl:value-of select="0" />
  </xsl:attribute>
- <xsl:attribute name="height">
  <xsl:value-of select="40" />
  </xsl:attribute>
- <xsl:attribute name="alt">
  <xsl:value-of select="'My Recent Photos'" />
  </xsl:attribute>
  </img>
  </a>
  </xsl:for-each>
  </td>
  </tr>
  </table>
  </xsl:template>
  </xsl:stylesheet>

Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsNews FeedsNews FeedsIs it possible to limit the number of results?Is it possible to limit the number of results?


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