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 FeedsNews Feeds from DNN Events Does Not Display in OrderNews Feeds from DNN Events Does Not Display in Order
Previous
 
Next
New Post
8/12/2014 11:30 AM
 
Albert,
I'm running different versions than you and don't have a default Events.xsl file. Can you provide me a link to your XSL? The screencast link keeps timing out.
 
New Post
8/12/2014 1:35 PM
 

Mike,

Here's a link to download the file http://l.bitcasa.com/xYjjU3iI or here's the content of the file.

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:news="http://www.dotnetnuke.com/modules/news" xmlns:e="http://www.dotnetnuke.com/dnnevents" xmlns:newsext="urn:NewsExtensions">
 <xsl:output method="html" indent="yes"/>
 <xsl:param name="ItemsToShow"/>
 <xsl:param name="ShowItemDetails"/>
 <xsl:param name="ShowItemDate"/>
 <xsl:param name="Locale"/>
 <xsl:param name="Target"/>
 <xsl:template match="rss">
  <xsl:for-each select="channel/item[position()&lt;=$ItemsToShow or $ItemsToShow&lt;1]">
   <xsl:sort data-type="text" select="e:EventTimeBegin" order="ascending"/>
   <h6 style="margin-bottom:0px;padding-bottom:0px;">
    <xsl:value-of select="newsext:FormatDateTimeFromString(e:EventTimeBegin, 'D')" />
    <xsl:if test="e:AllDayEvent='False'">&#160;<xsl:value-of select="newsext:FormatDateTimeFromString(e:EventTimeBegin, 't')" /></xsl:if>
    &#160;<xsl:value-of select="e:LocationName"/>
   </h6>
   <h3 style="margin-top:0px;padding-top:0px;">
    <a>
     <xsl:choose>
      <xsl:when test="normalize-space(e:DetailUrl)=''">
       <xsl:attribute name="href"><xsl:value-of select="link"/></xsl:attribute>
      </xsl:when>
      <xsl:otherwise>
       <xsl:attribute name="href"><xsl:value-of select="e:DetailUrl"/></xsl:attribute>
      </xsl:otherwise>
     </xsl:choose>
     <xsl:attribute name="target"><xsl:value-of select="$Target"/></xsl:attribute>
     <xsl:value-of select="title"/>
    </a>
   </h3>
  </xsl:for-each>
 </xsl:template>
</xsl:stylesheet>


 
New Post
8/12/2014 3:21 PM
 
Albert,

Okay...I think I see the problem.

You need to sort BEFORE the for-each. Otherwise, you're only sorting within each ITEM entry.

So, your XSL:SORT needs to be moved up one line and modified so that it sorts within the list of items.

It's been awhile since I've really done any XSL by hand.
 
New Post
8/12/2014 3:42 PM
 
This page might steer you in the right direction: http://www.w3schools.com/xsl/tryxslt....
 
New Post
8/12/2014 6:16 PM
 

Mike,

Thanks for the link to W3Schools. I read into the element but it does not allow you to move it before the <for-each> statement.</for-each>

I believe the sort statement is correct because instead of sorting on the XML element e:EventTimeBegin I changed it to title and the events were sorted alphabetically by title. The sort was applied to all items under channel.

My hunch is that the XML element is not being sorted properly or reformatted before it gets sorted.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsNews FeedsNews FeedsNews Feeds from DNN Events Does Not Display in OrderNews Feeds from DNN Events Does Not Display in Order


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