Index: /main/trunk/model-interfaces-dev/wmtb/transform/pages/home.xsl
===================================================================
--- /main/trunk/model-interfaces-dev/wmtb/transform/pages/home.xsl	(revision 34299)
+++ /main/trunk/model-interfaces-dev/wmtb/transform/pages/home.xsl	(revision 34300)
@@ -64,6 +64,12 @@
 			    <tbody class="wsite-multicol-tbody">
 			      <tr class="wsite-multicol-tr">
-				<xsl:call-template name="collectionAndGroupLinks"/>
+				<!-- <xsl:call-template name="collectionAndGroupLinks"/> -->
+
+				<!-- output the groups, the following outputs them column wise -->
+				<xsl:apply-templates select="groupList/group" mode="displayGroupInfo" />
+				<!-- then output the collectionList in a final column -->
+				<xsl:apply-templates select="collectionList/collection" mode="displayCollInfo" />
 			      </tr>
+			      
 			    </tbody>
 			  </table>
@@ -88,11 +94,16 @@
 	
 	<xsl:template name="collectionsList">
-		<!-- for every collection in the library -->
+	  	<!-- for every collection in the library -->
 		<xsl:for-each select="./collectionList/collection">		
 			<xsl:call-template name="collDescription"/>				
 		</xsl:for-each>
 	</xsl:template>
-
-	<xsl:template name="collDescription">
+	
+	<!--
+	    Template has match and name attributes allowing this to be called with both
+	    apply-templates and call-template.
+	    https://stackoverflow.com/questions/6478163/can-an-xslt-template-carry-both-name-and-match-attributes
+	-->
+	<xsl:template match="collection" name="collDescription" mode="displayColl">
 	  <xsl:variable name="collectionFolder" select="@name"/>
 	  <xsl:variable name="collectionName" select="displayItemList/displayItem[@name='name']"/>
@@ -136,13 +147,49 @@
 	    <td class="wsite-multicol-col" style="width:33.333333333333%; padding:0 15px;">
 	      <xsl:if test="name() = 'collection'">
-	      <xsl:call-template name="collDescription"/>
-	    </xsl:if>
-	    <xsl:if test="name() = 'group'">
-	      <xsl:call-template name="customGroupDescription"/>
-	    </xsl:if>
+		<xsl:call-template name="collDescription"/>
+	      </xsl:if>
+	      <xsl:if test="name() = 'group'">	      
+		<xsl:call-template name="customGroupDescription"/>
+	      </xsl:if>
 	    </td>
           </xsl:for-each>
-	  
-	</xsl:template>
+	</xsl:template>
+	
+	<!-- https://stackoverflow.com/questions/93511/counter-inside-xslfor-each-loop
+	will not work, since we have an if-statement inside the for loop to filter for groups.
+	Instead, counting only the groups using Borodin's solution (still xslt 1.0) from
+	https://stackoverflow.com/questions/16504727/increment-counter-in-xslt-1-0 works.
+
+	While that gives us a proper counter not dependent on position(), it doesn't solve
+	that we need to open a tag (td) on odd count and close it on even.
+	For that, the solution is at:
+	https://stackoverflow.com/questions/17992481/xsl-wrap-every-2-items-in-the-for-each-with-a-div
+
+	General: https://stackoverflow.com/questions/4478045/what-are-the-differences-between-call-template-and-apply-templates-in-xsl
+	-->
+	<xsl:template match="group" mode="displayGroupInfo">
+	  <xsl:variable name="counter"><xsl:value-of select="1+count(preceding-sibling::group)])"/></xsl:variable>
+	  <xsl:if test="($counter mod 2) = 1">
+	    <td class="wsite-multicol-col" style="width:33.333333333333%; padding:0 15px;">
+	      <xsl:apply-templates select=". |  following-sibling::group[1]" />
+	      <!-- calls the template match="group" without mode this time -->
+	    </td>
+	  </xsl:if>
+	</xsl:template>
+
+	<!-- We want collections to appear in a separate and single column.
+	     So we don't do even odd columns here. -->
+	<xsl:template match="collection" mode="displayCollInfo">
+	  <!--<xsl:variable name="counter"><xsl:value-of select="1+count(preceding-sibling::collection)])"/></xsl:variable>
+	  <xsl:if test="($counter mod 2) = 1">-->
+	    <td class="wsite-multicol-col" style="width:33.333333333333%; padding:0 15px;">
+	      <!--<xsl:apply-templates select=". |  following-sibling::collection[1]" />-->
+	      <xsl:apply-templates select="." mode="displayColl"/>
+		      <!-- why does calling the template match="collection" without some mode
+			   attr this time NOT work? -->
+	    </td>
+	  <!--</xsl:if>-->
+	</xsl:template>	
+
 	<xsl:template match="/page/xsltparams">
 	  <!-- suppress xsltparam block in page -->
@@ -150,5 +197,11 @@
 
 	<!-- Modified version of <gslib:groupLinkWithImage/>-->
-	<xsl:template name="customGroupDescription">
+	<!-- 
+	     Template has match and name attributes allowing this to be called with both
+	     apply-templates and call-template.
+	     https://stackoverflow.com/questions/6478163/can-an-xslt-template-carry-both-name-and-match-attributes
+	-->
+	<xsl:template match="group" name="customGroupDescription">
+
 	  <xsl:variable name="short"><xsl:value-of select="shortDescription"/></xsl:variable>
 	  <xsl:variable name="desc"><xsl:value-of select="description"/></xsl:variable>
