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 ListWhat is the best way to achive this layout ? What is the best way to achive this layout ?
Previous
 
Next
New Post
10/22/2007 1:11 AM
 

I am trying to create a searchable directory of folks.  The transpose is exactly the way I wish for the module to appear with the excetion of either  5 on a page with paging or even better would be for the photos to break to a line below after 6 records.  The transpose XLS works as far a s layout however has no search and each tie I add a record, the page gets wider. Any tips on how to do that ?

The example I am trying to adjust is here - http://www.christcommunity.org/NewsEvents/CCCNewsFeeds/tabid/179/Default.aspx

Any advice would be greatly appreciated.

Thanks !

David

 

 

 
New Post
10/24/2007 11:20 AM
 

You need to alter the xsl code by hand. I will show you the idea.

Currently you have a token template like:
<table>
..
<td>[IMAGE]</td>
<td>[Name]</td>
...
</table>


First step. please add a sourrounding <tr>
<table>
..
<tr>
<td>[IMAGE]</td>
<td>[Name]</td>
<tr/>
...
</table>

Enable searching and paging inside the options.

Generate the xsl.

Your layout will be repeated vertically, though you want to have a horizontal layout.

Look at the generated XSL:

  <xsl:template match="udt:Data" mode="list">
    <xsl:param name="from" select="1" />
    <xsl:param name="to" select="count(*)" />
    <xsl:if test="position() &gt; $from and position() &lt; $to">
     
<tr>
        <td>
          <xsl:value-of select="udt:Name" disable-output-escaping="yes" />
        </td>
        <td>
          <xsl:value-of select="udt:Image" disable-output-escaping="yes" />
        </td>
     
</tr>
    </xsl:if>
  </xsl:template>

.....

    <table>
      <xsl:apply-templates select="$currentData" mode="list">
        <xsl:with-param name="from" select="$from" />
        <xsl:with-param name="to" select="$to" />
      </xsl:apply-templates>
    </table>
....



Change it to:

  <xsl:template match="udt:Data" mode="list">
    <xsl:param name="from" select="1" />
    <xsl:param name="to" select="count(*)" />
    <xsl:if test="position() &gt; $from and position() &lt; $to">
        <td>
          <xsl:value-of select="udt:Name" disable-output-escaping="yes" />
        </td>
        <td>
          <xsl:value-of select="udt:Image" disable-output-escaping="yes" />
        </td>
    </xsl:if>
  </xsl:template>

.....

    <table>
<tr>
      <xsl:apply-templates select="$currentData" mode="list">
        <xsl:with-param name="from" select="$from" />
        <xsl:with-param name="to" select="$to" />
      </xsl:apply-templates>
</tr> 
   </table>
....

 
New Post
3/26/2008 12:48 AM
 

Stefan Cullmann wrote

You need to alter the xsl code by hand. I will show you the idea.

Stefan,

You were able to answer this request by using the paging functionality of UDT, but what if you want to break to a new line after a certain number of entries?
I am trying to display a gallery of pictures and I want to have 5 pictures across.  I assumed that I could use the xsl:if statement to insert a break, like:

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

<xsl:if test="position() mod 5 = 0"><br /></xsl:if>

...

</xsl:template>

I can only assume that the <br> is being split out, or I have the xsl:if statement in the wrong place.

What am I doing wrong?

Thanks,

c0utta

 
New Post
4/15/2008 3:16 AM
 

OK, since I didn't get a response I had another stab at this but with varying results. I'm trying a grid that will contain photos that are 10 across.

I reckon the following should work:

  <xsl:template match="udt:Data" mode="list">
    <xsl:for-each select="udt:Data[position() mod 10 = 1]">
    <tr>
      <xsl:apply-templates select=". | following-sibling::udt:Data[position() &lt; 10]" mode="item" />
    </tr>
    </xsl:for-each>
  </xsl:template>

  <xsl:template match="udt:Data" mode="item">
  <td>
     <xsl:value-of select="udt:Photo" disable-output-escaping="yes" />
  </td>
  </xsl:template>

BUT, I believe there's a problem referencing udt:Data (the namespace) within the select="" on both the for-each and the apply-templates. Is it possible that the colon (:) is causing me issues? If so, is there a way I can escape the colon?

Can anyone point me in the right direction?

Thanks in advance,

c0utta

 
New Post
4/15/2008 2:24 PM
 

this would only work if you have an XPath like udt:Data/udt:Data/udtData, which you don't have. 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListWhat is the best way to achive this layout ? What is the best way to achive this layout ?


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