Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hey im trying to generate a table but it has too many columns to print on one page so I would like to break the table after 10 columns of players this is my xsl now.
<xsl:template name="stats"> <table cellspacing="0" cellpadding="0" class="info"> <xsl:for-each select="/report/home/game"> <xsl:call-template name="structure"/> </xsl:for-each> </table> </xsl:template> <xsl:template name="structure"> <tr> <td class="border">Opponent</td> <td class="center border">Date</td> <td class="center border">Score</td> <td class="border"> </td> <xsl:for-each select="player"> <td class="center border"><xsl:value-of select="lastName"/><xsl:value-of select="firstName"/></td> <xsl:if test="position() mod 10 = 0 and position() != last()"> <xsl:text disable-output-escaping="yes"> </tr><tr> </xsl:text> </xsl:if> </xsl:for-each> </tr> <tr> <td class="border">something</td> <td class="center border">something</td> <td class="center border">something</td> <td class="border">&something</td> <xsl:for-each select="player"> <td class="center border"><xsl:value-of select="something"/></td> <xsl:if test="position() mod 10 = 0 and position() != last()"> <xsl:text disable-output-escaping="yes"> </tr><tr> </xsl:text> </xsl:if> </xsl:for-each> </tr> </xsl:template>
<table> <tr> <td>Opponent</td> <td>date</td> <td>score</td> <td> </td> <td>player</td> <td>player</td> <td>player</td> <td>player</td> <td>player</td> <td>player</td> <td>player</td> <td>player</td> <td>player</td> <td>player</td> </tr> <tr> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> </tr> </table> <!-- i want it to do this for every 10 players--> <table> <tr> <td>Opponent</td> <td>date</td> <td>score</td> <td> </td> <td>player</td> <td>player</td> <td>player</td> <td>player</td> <td>player</td> <td>player</td> <td>player</td> <td>player</td> <td>player</td> <td>player</td> </tr> <tr> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> <td>something</td> </tr> </table>
This post from Chriztian might help get you started: http://our.umbraco.org/forum/developers/xslt/11692-Simple-table-row-example-with-XSLT-templates?p=0#comment43151
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
start a new table after ten columns?
Hey im trying to generate a table but it has too many columns to print on one page so I would like to break the table after 10 columns of players this is my xsl now.
This post from Chriztian might help get you started: http://our.umbraco.org/forum/developers/xslt/11692-Simple-table-row-example-with-XSLT-templates?p=0#comment43151
is working on a reply...