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 ListHow do I get CardView with Paging?How do I get CardView with Paging?
Previous
 
Next
New Post
10/30/2007 4:18 PM
 

Hello,

I would like to use the CardView template on my site however it does not include paging. I was wondering if someone could give me some guidance on how I can modify the cardview to include paging with in template?

Thanks,
Ddraig

 
New Post
10/30/2007 4:25 PM
Accepted Answer 

Have you tried the new XSL generator in UDT 3.4.0? go to "Manage Table", select "User Defined XSL" and click the link to the generator. For details please have a look into the manual, available from the project's download page.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
10/30/2007 4:49 PM
 

Ahh, thanks Sebastian,

I had played with it a few days ago but I guess I did not play with it long enough to test out all the features. I think I've figured out how to do it now :)

Thanks,
Ddraig

 
New Post
10/30/2007 6:04 PM
 


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
10/31/2007 10:08 AM
 

Hi Sebastian,

I'm having a bit of difficulties with it. I have the tables the way I want with paging, but for whatever reason I can not get the UDT to center correctly on the page, and it screws up my skin. 

Here is an example of what I mean: http://www.misfitmercs.com/TestPage/tabid/69/Default.aspx
 
Here is the XSL, can you see anything wrong with it? I'm curious if you created your own xsl from this if it would do the same thing on your site. 

<?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:param name="param_page" select="1" />
  <xsl:variable name="paging" select="//udt:Context/udt:Paging" />

  <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">
      <table border="0" cellspacing="0" cellpadding="0" style="width: 500px;">
        <tr>
          <td>
            <table align="center" width="400" cellspacing="0" cellpadding="0" border="0" style="border-bottom: silver 1px solid;align: center;">
              <tr>
                <td width="50">
                  <xsl:call-template name="EditLink" />
                </td>
                <td width="100" valign="top">
                  <xsl:value-of select="udt:ClassImg" disable-output-escaping="yes" />
                </td>
                <td valign="top">
                  <h2>
                    <xsl:value-of select="udt:Name" disable-output-escaping="yes" />
                  </h2>
                  <table border="0" cellspacing="1" cellpadding="1" style="white space:nowrap;">
                    <tr>
                      <td>Level:</td>
                      <td>
                        <xsl:value-of select="udt:Level" disable-output-escaping="yes" />
                      </td>
                    </tr>
                    <tr>
                      <td>Class:</td>
                      <td>
                        <xsl:value-of select="udt:Class" disable-output-escaping="yes" />
                      </td>
                    </tr>
                    <tr>
                      <td>Position:</td>
                      <td>
                        <xsl:value-of select="udt:Position" disable-output-escaping="yes" />
                      </td>
                    </tr>
                    <tr>
                      <td>Rank:</td>
                      <td>
                        <xsl:value-of select="udt:Rank" disable-output-escaping="yes" />
                      </td>
                    </tr>
                    <tr>
                      <td>Xfire:</td>
                      <td>
                        <xsl:value-of select="udt:Xfire" disable-output-escaping="yes" />
                      </td>
                    </tr>
                    <tr>
                      <td>Company:</td>
                      <td>
                        <xsl:value-of select="udt:Company" disable-output-escaping="yes" />
                      </td>
                    </tr>
                    <tr>
                      <td>Status:</td>
                      <td>
                        <xsl:value-of select="udt:Status" disable-output-escaping="yes" />
                      </td>
                    </tr>
                    <tr>
                      <td>TimeZone:</td>
                      <td>
                        <xsl:value-of select="udt:TimeZone" disable-output-escaping="yes" />
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </xsl:if>
  </xsl:template>

  <xsl:template match="/udt:UserDefinedTable">
    <xsl:variable name="currentData" select="udt:Data" />
    <xsl:variable name="from">
      <xsl:choose>
        <xsl:when test="$paging">
          <xsl:value-of select="$paging * $param_page - $paging" />
        </xsl:when>
        <xsl:otherwise>0</xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <xsl:variable name="to">
      <xsl:choose>
        <xsl:when test="$paging">
          <xsl:value-of select="$paging * $param_page +1" />
        </xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="count($currentData)+1" />
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <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>
    <xsl:if test="$paging">
      <xsl:call-template name="renderPaging">
        <xsl:with-param name="maxPages" select="ceiling(count($currentData) div $paging)" />
      </xsl:call-template>
    </xsl:if>
  </xsl:template>

  <xsl:template name="pagingSinglePages">
    <!--renders paging links-->
    <xsl:param name="pageNumber" select="1" />
    <xsl:param name="maxPages" select="ceiling(count(//udt:Data) div $paging)" />
    <xsl:choose>
      <xsl:when test="$param_page=$pageNumber">
        <span class="NormalDisabled">[<xsl:value-of select="$pageNumber" />]</span>
      </xsl:when>
      <xsl:otherwise>
        <a href="?{$prefix_param}_page={$pageNumber}" class="CommandButton">
          <xsl:value-of select="$pageNumber" />
        </a>
      </xsl:otherwise>
    </xsl:choose>
<xsl:if test="$pageNumber &lt; $maxPages"><xsl:call-template name="pagingSinglePages"><xsl:with-param name="pageNumber" select="$pageNumber +1" /><xsl:with-param name="maxPages" select="$maxPages" /></xsl:call-template></xsl:if></xsl:template>

  <xsl:template name="renderPaging">
    <xsl:param name="maxPages" select="ceiling(count(//udt:Data) div $paging)" />
    <xsl:variable name="previous" select="$param_page - 1" />
    <xsl:variable name="next" select="$param_page + 1" />
    <table class="PagingTable" bordercolor="Gray" border="0" style="border-color:Gray;border-width:1px;border-style:Solid;width:100%;">
      <tr>
        <td class="Normal" align="Left">
          <xsl:value-of select="//udt:Context/udt:LocalizedString_Page" />&#160;<xsl:value-of select="$param_page" />&#160;<xsl:value-of select="//udt:Context/udt:LocalizedString_Of" />&#160;<xsl:value-of select="$maxPages" /></td>
        <td class="Normal" align="Right">
          <xsl:choose>
            <xsl:when test="$param_page&gt;1">
              <a href="?" class="CommandButton">
                <xsl:value-of select="//udt:Context/udt:LocalizedString_First" />
              </a>
            </xsl:when>
            <xsl:otherwise>
              <span class="NormalDisabled">
                <xsl:value-of select="//udt:Context/udt:LocalizedString_First" />
              </span>
            </xsl:otherwise>
          </xsl:choose> 
<xsl:choose><xsl:when test="$param_page&gt;1"><a href="?{$prefix_param}_page={$previous}" class="CommandButton"><xsl:value-of select="//udt:Context/udt:LocalizedString_Previous" /></a></xsl:when><xsl:otherwise><span class="NormalDisabled"><xsl:value-of select="//udt:Context/udt:LocalizedString_Previous" /></span></xsl:otherwise></xsl:choose> 
<xsl:variable name="startpage"><xsl:choose><xsl:when test="$param_page&gt;5"><xsl:value-of select="$param_page -4" /></xsl:when><xsl:otherwise>1</xsl:otherwise></xsl:choose></xsl:variable><xsl:variable name="endpage"><xsl:choose><xsl:when test="$startpage+9&gt;$maxPages"><xsl:value-of select="$maxPages" /></xsl:when><xsl:otherwise><xsl:value-of select="$startpage +9" /></xsl:otherwise></xsl:choose></xsl:variable><xsl:call-template name="pagingSinglePages"><xsl:with-param name="pageNumber" select="$startpage" /><xsl:with-param name="maxPages" select="$endpage" /></xsl:call-template><xsl:choose><xsl:when test="$param_page&lt;$maxPages"><a href="?{$prefix_param}_page={$next}" class="CommandButton"><xsl:value-of select="//udt:Context/udt:LocalizedString_Next" /></a></xsl:when><xsl:otherwise><span class="NormalDisabled"><xsl:value-of select="//udt:Context/udt:LocalizedString_Next" /></span></xsl:otherwise></xsl:choose> 
<xsl:choose><xsl:when test="$param_page&lt;$maxPages"><a href="?{$prefix_param}_page={$maxPages}" class="CommandButton"><xsl:value-of select="//udt:Context/udt:LocalizedString_Last" /></a></xsl:when><xsl:otherwise><span class="NormalDisabled"><xsl:value-of select="//udt:Context/udt:LocalizedString_Last" /></span></xsl:otherwise></xsl:choose> 
</td>
      </tr>
    </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>
</xsl:stylesheet>

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListHow do I get CardView with Paging?How do I get CardView with Paging?


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