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

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...height of the rss feedsheight of the rss feeds
Previous
 
Next
New Post
4/24/2006 11:44 AM
 

Hi, How to adjust the height of the rss feeds? It currently pushes the bottom of the site way down because there are so many articles.   Is that the news feed style sheet?  How does that work? Please help, many thanks.

 
New Post
4/24/2006 6:58 PM
 

I had a question by someone about this recently on my forums and I suggested either a third party news feed reader, or perhaps a div overflow to the CSS sheet.  Have you tried that?

I can't remember what the person did exactly since it's the French part of my forum and I'll have to ask someone about the translation.

Nina Meiers


Nina Meiers My Little Website
If it's on DNN, I fix, build, deploy, support,skin, host, design, consult, implement, integrate and done since 2003.
Who am I? Just a city chic, having a crack at organic berry farming.. and creating awesome websites.
 
New Post
4/25/2006 3:26 AM
 
lionelluo wrote

Hi, How to adjust the height of the rss feeds? It currently pushes the bottom of the site way down because there are so many articles.   Is that the news feed style sheet?  How does that work? Please help, many thanks.

Hello lionelluo

As well as Nina's suggestion, you can limit the number of items within your xsl file:

<xsl:if test="position() &lt; 6">

If the position within the RSS feed is less than item number 6, then continue and display the following elements. This will display the first 5 items in the RSS feed.

<xsl:if test="position() &lt; 6">
        <br>
        <strong><a href="{link}" target="_main"><xsl:value-of select="title"/></a></strong>
        <br>
            <xsl:value-of select="pubDate"/>
        </br>
</xsl:if>

You can also use:

<xsl:for-each select="channel/item[position() &lt; 6]">

Which selects the first 5 items from the RSS feed.

 

This is an example of how your file might look, you just need to edit to suit the required number.

 

---------------------------------------------------------------------

<?xml version="1.0"?>

<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">
  
   <xsl:for-each select="channel/item[position() &gt; 1]">
 
  
  <!-- Test to limit number of items displayed.  Here only 5 items will be transformed -->
  <xsl:if test="position() &lt; 6">

    <br></br>
    <!-- to open links in a new window, change target="_main" to target="_new" -->
    <strong><a href="{link}" target="_main"><xsl:value-of select="title"/></a></strong>
    <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"/> -->
 <br></br>
  </xsl:if>
  </xsl:for-each>
 
</xsl:template>


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

</xsl:stylesheet>

 

----------------------------------------------------------------------

I hope this helps.  You can find a useful RSS tutorial  here: http://www.dnncreative.com/Tutorials/RSSNewsFeedXSLStylesheet/tabid/162/Default.aspx

 

Regards

Lynn


 


www.seemalta.net
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...height of the rss feedsheight of the rss feeds


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