Part of: Main

 

Page Actions: Edit PageRecent ChangesPage HistoryPrintable View

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.

"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