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 ListGrouping + Detail ViewGrouping + Detail View
New Post
5/27/2016 8:33 AM

I'm having a hard time with detail view urls when grouping data. I get extra spaces in the url, for example /Research-Findings/Current-Completed-Projects?%20%20%20%20%20%20%20%20udt_1588_param%20%20%20%20_detail=1857.

I cannot figure out what I'm doing wrong in the stylesheet as <a href="?{$prefix_param}_detail={udt:UserDefinedRowId}"> works otherwise. The grouping seems to be the issue. 

Here is the full stylesheet:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="" 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:param name="param_detail" />

    <xsl:key name="data-by-topic" match="udt:Data" use="udt:Topic" />


    <xsl:template match="udt:Data" mode="detail">

        <xsl:call-template name="EditLink" />

        <xsl:call-template name="ListView" />

        Category: <xsl:value-of select="udt:Topic" disable-output-escaping="yes" />

        Status: <xsl:value-of select="udt:Status" disable-output-escaping="yes" /><xsl:value-of select="udt:Title" disable-output-escaping="yes" /><xsl:value-of select="udt:Funding_x0020_Source" disable-output-escaping="yes" /><xsl:value-of select="udt:Funding_x0020_Period" disable-output-escaping="yes" /><xsl:value-of select="udt:Study_x0020_Design" disable-output-escaping="yes" /><xsl:value-of select="udt:Purpose" disable-output-escaping="yes" /><xsl:value-of select="udt:Further_x0020_Study_x0020_Details" disable-output-escaping="yes" /><xsl:value-of select="udt:Findings" disable-output-escaping="yes" /><xsl:value-of select="udt:Eligibility" disable-output-escaping="yes" /><xsl:value-of select="udt:Participation_x0020_Information" disable-output-escaping="yes" /><xsl:value-of select="udt:Description" disable-output-escaping="yes" /><xsl:value-of select="udt:Qualifications" disable-output-escaping="yes" /><xsl:value-of select="udt:Benefits" disable-output-escaping="yes" /><xsl:value-of select="udt:Application" disable-output-escaping="yes" />



    <xsl:template match="udt:Data" mode="list">

        <li class="dnnGridItem">

            <xsl:call-template name="DetailView" />


            <xsl:value-of select="udt:Status" disable-output-escaping="yes" />




    <xsl:template match="/udt:UserDefinedTable">

        <xsl:for-each select="udt:Data[count(. | key('data-by-topic', udt:Topic)[1]) = 1]">

            <xsl:sort select="udt:Topic" order="ascending" />


                <xsl:value-of select="udt:Topic" disable-output-escaping="yes" />



            <xsl:when test="$param_detail">

                <!--master-detail view-->

                <xsl:apply-templates select="udt:Data[udt:UserDefinedRowId=$param_detail]" mode="detail" />



                <xsl:variable name="currentData" select="key('data-by-topic', udt:Topic)" />

                <xsl:if test="$currentData">


                        <xsl:apply-templates select="$currentData" mode="list">









    <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" />





    <xsl:template name="ListView">

        <a href="{//udt:Context/udt:ApplicationPath}/tabid/{//udt:Context/udt:TabId}/Default.aspx">

            <img border="0" alt="Back" src="{//udt:Context/udt:ApplicationPath}/images/lt.gif" />




    <xsl:template name="DetailView">



        <a href="?{$prefix_param}_detail={udt:UserDefinedRowId}">

            <xsl:value-of select="udt:Title" disable-output-escaping="yes" />




New Post
5/31/2016 11:41 AM
Accepted Answer 
Remove the line breaks in the XSL in this section:

    <xsl:variable name="prefix_param">

        udt_<xsl:value-of select="//udt:Context/udt:ModuleId" />_param


so that it's:

    <xsl:variable name="prefix_param">udt_<xsl:value-of select="//udt:Context/udt:ModuleId" />_param</xsl:variable>

The spaces IN the XSL are being rendered. I ran into a similar problem recently and it drove me crazy trying to figure out what was going on.



New Post
5/31/2016 11:50 AM

You've saved my sanity. Thank you!

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListGrouping + Detail ViewGrouping + Detail View

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