HomeHomeDotNetNuke Forg...DotNetNuke Forg...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 1: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 2: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 2: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 9:45 AM
 

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 4: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   European Network of DotNetNuke Professionals

 
Previous
 
Next
HomeHomeDotNetNuke Forg...DotNetNuke Forg...Module ForumsModule ForumsNews FeedsNews FeedsHeadlines Ticker xsl for v4.0 available...Headlines Ticker xsl for v4.0 available...


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

Attend A Webinar
Free Demo Site
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me
Have Someone Contact Me

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

DotNetNuke Scoop!

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates the DotNetNuke Store where users purchase third party apps for the platform.