Part of: Main

 

Page Actions: Edit PageRecent ChangesPage HistoryPrintable View

Main.XSLrowCount History

Hide minor edits - Show changes to markup

February 10, 2005, at 05:36 PM by 209.32.200.12 -
Changed line 1 from:

On the 2005 homepage i needed to display rows of three images but i felt the layout was unbalanced when the last row had only one image. To solve this i put an extra poster in at the end and used mod to detect if the number of posters was divisible by 3.

to:

On the 2005 homepage i needed to display rows of three divs but i felt the layout was unbalanced when the last row had only one image. To solve this i put an extra div in at the end and used mod to detect if the number of posters was divisible by 3.

February 10, 2005, at 05:34 PM by 209.32.200.12 -
Changed line 3 from:

//content/poster gives us the number of poster nodes in the content node.

to:

"content/poster" gives us the number of poster nodes in the content node.

Changed lines 5-6 from:

@@ <xsl:if test="count(//content/poster) mod 3 = 1">

to:
 <xsl:if test="count(//content/poster) mod 3 = 1">
Changed lines 9-10 from:

</xsl:if> @@

to:
 </xsl:if>
February 10, 2005, at 05:31 PM by 209.32.200.12 -
Changed lines 1-12 from:

Describe XS Lrow Count here.

to:

On the 2005 homepage i needed to display rows of three images but i felt the layout was unbalanced when the last row had only one image. To solve this i put an extra poster in at the end and used mod to detect if the number of posters was divisible by 3.

//content/poster gives us the number of poster nodes in the content node.

@@ <xsl:if test="count(//content/poster) mod 3 = 1">

     Poster Div goes here.

</xsl:if> @@

I used this link as a reference http://www17.homepage.villanova.edu/william.pohlhaus/xsl/mod/

Page last modified on November 16, 2005, at 03:59 PM
Page Actions: Edit PageRecent ChangesPage HistoryPrintable View