Hello..
Using the grouping XSL from the forms and lists website (
http://www.formandlist.com/Documentat...), I was able to get a XSL created which allows the grouping of items by month and year; exactly what I wanted.
But, I have something new which I'd like to accomplish and don't know enough about XSL to do it on my own and am requesting assistance. I'd like a create this into a table which would allow me to have four columns across.
I'm using this as an archive files calendar and would like to have January through April on one line, May through August on another line, etc.
Thanks.. -Jeff
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:udt="DotNetNuke/UserDefinedTable" exclude-result-prefixes="udt">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes" />
<!--
This prefix is used to generate module specific query strings
Each querystring or form value that starts with udt_{ModuleId}_param
will be added as parameter starting with param
-->
<xsl:variable name="prefix_param">udt_<xsl:value-of select="//udt:Context/udt:ModuleId" />_param</xsl:variable>
<xsl:key name="data-by-monthyear" match="udt:Data" use="udt:Month_x0020_and_x0020_Year" />
<xsl:template match="udt:Data" mode="list">
<li class="Normal">
<xsl:value-of select="udt:File_x0020_Name" disable-output-escaping="yes" />
<xsl:call-template name="EditLink" />
</li>
</xsl:template>
<xsl:template match="/udt:UserDefinedTable">
<ul>
<xsl:for-each select="udt:Data[count(. | key('data-by-monthyear', udt:Month_x0020_and_x0020_Year)[1]) = 1]">
<xsl:sort select="udt:Month_x0020_and_x0020_Year" />
<li>
<xsl:value-of select="udt:Month_x0020_and_x0020_Year" disable-output-escaping="yes" />
<xsl:variable name="currentData" select="key('data-by-monthyear', udt:Month_x0020_and_x0020_Year)" />
<xsl:if test="$currentData">
<ul>
<xsl:apply-templates select="$currentData" mode="list">
</xsl:apply-templates>
</ul>
</xsl:if>
</li>
</xsl:for-each>
</ul>
</xsl:template>
<xsl:template name="EditLink">
<xsl:if test="udt:EditLink">
<a href="{udt:EditLink}">
<img border="0" alt="edit" src="{//udt:Context/udt:ApplicationPath}/images/edit.gif" />
</a>
</xsl:if>
</xsl:template>
</xsl:stylesheet>