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 FeedsHeadlines Ticker xsl for v4.0 available...Headlines Ticker xsl for v4.0 available...
Previous
 
Next
New Post
9/10/2008 4:23 PM
 

After playing around with the new News module, I found a slight implementation issue with the using the Ticker.xsl.  When I choose to use this xsl, I don't get the expected results, which is seeing a display of the news headlines scroll across my module 1 at a time.  Instead the xsl displays all of the items, and scrolls them all across the module container.  If you have 10 or more items this kind of implementation is really distracting, as all of the items display and are scrolled.

Now, that is not the implementation I've seen with other similar web usage.  So, I created an alternative xsl that can be dropped into the modules transformation folder and used to provide the display of News Headlines scrolling across the module container.  This is mostly useful for the Top container area, but suppose you could put it elsewhere - I use it in the Top area. 

The settings for 'Show Items Date', and 'Show Items Detail' are not used, as this xsl is desigened just to display the headlines (title element), which I think is the more oft used implementation. 

The other thing about this new xsl is that it will support the "ItemsToShow" parameter, but keep in mind that if you are agregating a number of feeds, the count is for the total number of items to show, not the number of items to show per feed. 

I placed this HeadlinesTicker.xsl in the same folder as the other default News xsl files

\Website\DesktopModules\News\Transformations

I'm guessing that you could upload it, and choose it for using for your module, as it does transform RSSv2.0 feeds, which is the only custom xsl types that I've seen actually work with the new module.  Copy and paste the code, save it to a file using your favorite bare bones text editor.  Then, place it our upload it.  Be sure to test it out first, though to ensure it does what you think it should.

 

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<!-- Headlines News Ticker by Phil 'iwonder' Guerra -->
<!-- Works with new DNN News v4.0 module -->
<xsl:param name="ItemsToShow"/>
 <xsl:template match="rss">
<html>
<body>
 <marquee direction="left"  OnMouseOver="this.stop();" OnMouseOut="this.start();">
  <xsl:apply-templates select="channel/item" />
 </marquee>
</body></html>
</xsl:template>
 <xsl:template match="channel/item">
  <xsl:variable name="spacer" select="' *** '"/>
  <xsl:variable name="headline" select="title"/>
<xsl:if test="position() &lt; $ItemsToShow + 1 or $ItemsToShow &lt; 0 ">
   <strong><a href="{link}">
   <xsl:value-of select="title"/></a>
     <xsl:value-of select="$spacer"/>
         </strong>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

 
New Post
9/10/2008 5:05 PM
 

Nice Phil,

I'll include it in the next release if that's OK with you.

Peter


Peter Donker
Bring2mind http://www.bring2mind.net
Home of the Document Exchange,
the professional document management solution for DNN
 
New Post
9/10/2008 5:18 PM
 

Be my guest.  It's out there for the community, and I'm more than happy to contribute what I can.

 
New Post
9/19/2008 12:45 PM
 

And for those that want to open the linked item to a 'new' window or tab (for browsers that support it) replace this line:

   <strong><a href="{link}">

With this one:

   <strong><a href="{link}" target="_new">
 

 
New Post
9/20/2008 7:33 AM
 

Phil,

afaik the correct syntax to open link in new window is target="_blank", do I miss sth?


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsNews FeedsNews FeedsHeadlines Ticker xsl for v4.0 available...Headlines Ticker xsl for v4.0 available...


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