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 ForumsForm and ListForm and ListUDT in DNN 4UDT in DNN 4
Previous
 
Next
New Post
6/6/2011 12:56 PM
 
I'm running DNN 04.09.05 UDT 03.05.01. I set it up to use a custom xsl stylesheet. I got it working the way I wanted it to, but when I use my custom built one, none of the sorting works. Any ideas why? Here is the xsl I have

<?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">
  <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:template match="udt:Data" mode="list">
    <tr class="normal">
      <td>
        <xsl:call-template name="EditLink" />
        <span style="color: black; font-weight: bold; font-size: 12px;">
          <u>
            <xsl:value-of select="udt:Date_UDT_Value" disable-output-escaping="yes" />
          </u>
        </span>
      </td>
    </tr>
    <tr>
      <td>
        <table>
          <tr>
            <td style="font-size: 12px; font-weight: bold; width: 70px; padding-right: 10px;" valign="top">
              <xsl:choose>
                <xsl:when test="udt:Listing = 'For Sale'">
                  <span style="color: red;">
                    <xsl:value-of select="udt:Listing" disable-output-escaping="yes" />
                  </span>
                </xsl:when>
                <xsl:when test="udt:Listing = 'For Sale:'">
                  <span style="color: red;">
                    <xsl:value-of select="udt:Listing" disable-output-escaping="yes" />
                  </span>
                </xsl:when>
                <xsl:when test="udt:Listing = 'Give Away'">
                  <span style="color: orange;">
                    <xsl:value-of select="udt:Listing" disable-output-escaping="yes" />
                  </span>
                </xsl:when>
                <xsl:when test="udt:Listing = 'Give Away:'">
                  <span style="color: orange;">
                    <xsl:value-of select="udt:Listing" disable-output-escaping="yes" />
                  </span>
                </xsl:when>
                <xsl:when test="udt:Listing = 'Found'">
                  <span style="color: blue;">
                    <xsl:value-of select="udt:Listing" disable-output-escaping="yes" />
                  </span>
                </xsl:when>
                <xsl:when test="udt:Listing = 'Found:'">
                  <span style="color: blue;">
                    <xsl:value-of select="udt:Listing" disable-output-escaping="yes" />
                  </span>
                </xsl:when>
                <xsl:when test="udt:Listing = 'Lost'">
                  <span style="color: blue;">
                    <xsl:value-of select="udt:Listing" disable-output-escaping="yes" />
                  </span>
                </xsl:when>
                <xsl:when test="udt:Listing = 'Lost:'">
                  <span style="color: blue;">
                    <xsl:value-of select="udt:Listing" disable-output-escaping="yes" />
                  </span>
                </xsl:when>
                <xsl:otherwise>
                  <span style="color: green;">
                    <xsl:value-of select="udt:Listing" disable-output-escaping="yes" />
                  </span>
                </xsl:otherwise>
              </xsl:choose>
            </td>
            <td style="font-size: 12px;" valign="top">
              <xsl:value-of select="udt:Description" disable-output-escaping="yes" />
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </xsl:template>


  <xsl:template match="/udt:UserDefinedTable">
    <xsl:variable name="currentData" select="udt:Data" />
    <table>
      <xsl:apply-templates select="$currentData" mode="list">
      </xsl:apply-templates>
    </table>
  </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>
<udt:template listType="table" delimiter=";" listView="&lt;tr class=&quot;normal&quot;&gt;&#xD;&#xA;  &lt;td&gt;[UDT:EditLink] [Date_UDT_Value]&lt;/td&gt;&#xD;&#xA;  &lt;td&gt;[Listing]&lt;/td&gt;&#xD;&#xA;  &lt;td&gt;[Description]&lt;/td&gt;&#xD;&#xA;&lt;/tr&gt;" detailView="[UDT:ListView][UDT:EditLink]&#xD;&#xA;&lt;table&gt;&#xD;&#xA;  &lt;tr&gt;&#xD;&#xA;    &lt;td class=&quot;normalBold&quot;&gt;Listing&lt;/td&gt;&#xD;&#xA;    &lt;td class=&quot;normal&quot;&gt;[Listing]&lt;/td&gt;&#xD;&#xA;  &lt;/tr&gt;&#xD;&#xA;  &lt;tr&gt;&#xD;&#xA;    &lt;td class=&quot;normalBold&quot;&gt;Description&lt;/td&gt;&#xD;&#xA;    &lt;td class=&quot;normal&quot;&gt;[Description]&lt;/td&gt;&#xD;&#xA;  &lt;/tr&gt;&#xD;&#xA;  &lt;tr&gt;&#xD;&#xA;    &lt;td class=&quot;normalBold&quot;&gt;Date&lt;/td&gt;&#xD;&#xA;    &lt;td class=&quot;normal&quot;&gt;[Date_UDT_Value]&lt;/td&gt;&#xD;&#xA;  &lt;/tr&gt;&#xD;&#xA;  &lt;tr&gt;&#xD;&#xA;    &lt;td class=&quot;normalBold&quot;&gt;Changed at&lt;/td&gt;&#xD;&#xA;    &lt;td class=&quot;normal&quot;&gt;[Changed at_UDT_Value]&lt;/td&gt;&#xD;&#xA;  &lt;/tr&gt;&#xD;&#xA;  &lt;tr&gt;&#xD;&#xA;    &lt;td class=&quot;normalBold&quot;&gt;Changed by&lt;/td&gt;&#xD;&#xA;    &lt;td class=&quot;normal&quot;&gt;[Changed by]&lt;/td&gt;&#xD;&#xA;  &lt;/tr&gt;&#xD;&#xA;  &lt;tr&gt;&#xD;&#xA;    &lt;td class=&quot;normalBold&quot;&gt;Created at&lt;/td&gt;&#xD;&#xA;    &lt;td class=&quot;normal&quot;&gt;[Created at_UDT_Value]&lt;/td&gt;&#xD;&#xA;  &lt;/tr&gt;&#xD;&#xA;  &lt;tr&gt;&#xD;&#xA;    &lt;td class=&quot;normalBold&quot;&gt;Created by&lt;/td&gt;&#xD;&#xA;    &lt;td class=&quot;normal&quot;&gt;[Created by]&lt;/td&gt;&#xD;&#xA;  &lt;/tr&gt;&#xD;&#xA;&lt;/table&gt;" />
</xsl:stylesheet>
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListUDT in DNN 4UDT in DNN 4


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