Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

$4.95 Windows Hosting at Webhost4life.com
  Ads  
OnyakTech
 


  Sponsors  

Meet Our Sponsors

telerik
ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  User Defined Ta...  What is the best way to achive this layout ?
Previous Previous
 
Next Next
New Post 10/21/2007 11:11 PM
User is offline David
3 posts
wwwchristcommunity.org
10th Ranked


What is the best way to achive this layout ?  

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 9:20 AM
Online now... Stefan Cullmann
1553 posts
5th Ranked








Re: What is the best way to achive this layout ?  

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>
....


Stefan Cullmann - stefan.cullmann [at] dotnetnuke.com
form and List will be the successor of the User Defined Table module.
----------------------------------------------------------------------
Do you want to import external data to form and List /User Defined Table?
Check out http://www.codeplex.com/Csv2UDTImport
 
New Post 3/25/2008 10:48 PM
User is offline c0utta
7 posts
10th Ranked


Re: What is the best way to achive this layout ?  

 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 1:16 AM
User is offline c0utta
7 posts
10th Ranked


Re: What is the best way to achive this layout ?  

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 12:24 PM
Online now... Stefan Cullmann
1553 posts
5th Ranked








Re: What is the best way to achive this layout ?  

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


Stefan Cullmann - stefan.cullmann [at] dotnetnuke.com
form and List will be the successor of the User Defined Table module.
----------------------------------------------------------------------
Do you want to import external data to form and List /User Defined Table?
Check out http://www.codeplex.com/Csv2UDTImport
 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  User Defined Ta...  What is the best way to achive this layout ?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


TMA Resources
TMA Resources is a software company providing eBusiness solutions for the Association market.
www.tmaresources.com
DotNetNuke Hosting Provider UK
UK leading DotNetNuke Hosting provider. Owned and operated by a Microsoft Gold Certified Partner.
www.DNN-Portals.co.uk
Alliance Systems & Programming Inc
Alliance is not just our name... it's how we do business. We partner with our clients, learning their business processes and standards and then applying our expertise to help them improve their workflow and profitability.
www.Alliancesys.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP