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 ListAdd 2nd and 3trd column in XSLTAdd 2nd and 3trd column in XSLT
Previous
 
Next
New Post
9/5/2009 2:57 PM
 

Hi

I have allot of name (40) that I want to present in a form and list module. I tried to create a self made style like this
<tr class="Normal">
  <td>[UDT:DetailView]</td>
  <td>[Name]</td>
</tr>
 
this code will show the name like this
 
Christian
John
Chris
Jesse
 
I’m not an expert in coding, and wonder if there is a solution to get code to add people in columns to right, like this.
 
Christian           John             Chris
Jesse                ........               .......
 
Re-coding the small code to a table with columns and add the [Name] parameter will just show the person 3 times.
 
This code will show the same person 3 times
 
 <tr class="Normal">
<table>
  <td>[UDT:DetailView]</td>
  <td>[Name]</td>
  <td>[Name]</td>td>
</table>
</tr>
 
Could some please give me an answer, or a hint?
 
New Post
9/5/2009 6:16 PM
 

Christian, this is exactly the same question as you asked before. Again you need XSLT knowledge, at the main idea is still available you you in this thread: http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/56/threadid/178257/scope/posts/Default.aspx

I am aware that this did not help you in the past, though here is now the concrete script for your todays request:

<?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" />
 
   <xsl:template match="udt:Data" mode="list">
    <xsl:value-of select="udt:Name" disable-output-escaping="yes" />
  </xsl:template>

  <xsl:template match="/udt:UserDefinedTable">
    <xsl:if test="udt:Data">
      <table>
        <xsl:for-each select="udt:Data[position() mod 3 = 1]">
          <xsl:variable name="row" select="position()" />
          <tr class="Normal">
            <td>
              <xsl:apply-templates select="." mode="list" />
            </td>
            <td>
              <xsl:apply-templates select="../udt:Data[($row -1)*3 +2]" mode="list" />
            </td>
            <td>
              <xsl:apply-templates select="../udt:Data[($row -1)*3 +3]" mode="list" />
            </td>
          </tr>
        </xsl:for-each>
      </table>
    </xsl:if>
  </xsl:template>
 
</xsl:stylesheet>
 
New Post
9/6/2009 6:19 PM
 

Thank you :D The only thing I need is the detail view, I can't get it to work on my own. A tip or answare?

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListAdd 2nd and 3trd column in XSLTAdd 2nd and 3trd column in XSLT


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