Index: /main/trunk/greenstone3/web/interfaces/default/transform/layouts/webswing-collage.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/default/transform/layouts/webswing-collage.xsl	(revision 38991)
+++ /main/trunk/greenstone3/web/interfaces/default/transform/layouts/webswing-collage.xsl	(revision 38992)
@@ -347,4 +347,121 @@
 
   </xsl:template>
+
+    <xsl:template name="get-collage-settings">
+    <!-- Creates gsf variables (which sets XSL and JavaScript vars) for any user configured
+	 Collage Classifier options coming through collectionConfig and then buildConfig,
+	 so that JavaScript can pass them to the webswing instance on starting it up. -->
+    <xsl:choose>
+        <xsl:when test="option[@name='geometry']/@value">
+	  <gsf:variable name="collagewidth">
+	    <xsl:value-of select="substring-before(option[@name='geometry']/@value, 'x')" />
+	  </gsf:variable>
+	  <gsf:variable name="collageheight">
+	    <xsl:value-of select="substring-after(option[@name='geometry']/@value, 'x')" />
+	  </gsf:variable>
+	</xsl:when>
+    </xsl:choose>
+    
+    <xsl:choose>
+      <xsl:when test="option[@name='verbosity']/@value">
+	<gsf:variable name="verbosity">
+	  <xsl:value-of select="option[@name='verbosity']/@value"/>
+	</gsf:variable>
+      </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+      <xsl:when test="option[@name='imageMustNotHave']/@value">
+	<gsf:variable name="imageMustNotHave">
+	  <xsl:value-of select="option[@name='imageMustNotHave']/@value"/>
+	</gsf:variable>
+      </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+      <xsl:when test="option[@name='imageType']/@value">
+	<gsf:variable name="imageType">
+	  <xsl:value-of select="option[@name='imageType']/@value"/>
+	</gsf:variable>
+      </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+      <xsl:when test="option[@name='maxDepth']/@value">
+	<gsf:variable name="maxDepth">
+	  <xsl:value-of select="option[@name='maxDepth']/@value"/>
+	</gsf:variable>
+      </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+      <xsl:when test="option[@name='maxDisplay']/@value">
+	<gsf:variable name="maxDisplay">
+	  <xsl:value-of select="option[@name='maxDisplay']/@value"/>
+	</gsf:variable>
+      </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+      <xsl:when test="option[@name='refreshDelay']/@value">
+	<gsf:variable name="refreshDelay">
+	  <xsl:value-of select="option[@name='refreshDelay']/@value"/>
+	</gsf:variable>
+      </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+      <xsl:when test="option[@name='isJava2']/@value">
+	<gsf:variable name="isJava2">
+	  <xsl:value-of select="option[@name='isJava2']/@value"/>
+	</gsf:variable>
+      </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
+      <xsl:when test="option[@name='bgcolor']/@value">
+	<gsf:variable name="bgcolor">
+	  <xsl:value-of select="option[@name='bgcolor']/@value"/>
+	</gsf:variable>
+      </xsl:when>
+    </xsl:choose>
+    
+    <!-- 
+	 Defaults to fall back on when there is no user customisation
+	 can be manually adjusted here. -->
+    <!--    
+    <xsl:call-template name="set-collage-gsfvar-if-exists">
+      <xsl:with-param name="varName">imageMustNotHave</xsl:with-param>
+    </xsl:call-template>    
+    <xsl:call-template name="set-collage-gsfvar-if-exists">
+      <xsl:with-param name="varName">imageType</xsl:with-param>
+    </xsl:call-template>    
+    <xsl:call-template name="set-collage-gsfvar-if-exists">
+      <xsl:with-param name="varName">verbosity</xsl:with-param>
+    </xsl:call-template>
+    <xsl:call-template name="set-collage-gsfvar-if-exists">
+      <xsl:with-param name="varName">maxDepth</xsl:with-param>
+    </xsl:call-template>
+    <xsl:call-template name="set-collage-gsfvar-if-exists">
+      <xsl:with-param name="varName">maxDisplay</xsl:with-param>
+    </xsl:call-template>
+    <xsl:call-template name="set-collage-gsfvar-if-exists">
+      <xsl:with-param name="varName">refreshDelay</xsl:with-param>
+    </xsl:call-template>
+    <xsl:call-template name="set-collage-gsfvar-if-exists">
+      <xsl:with-param name="varName">isJava2</xsl:with-param>
+    </xsl:call-template>
+    <xsl:call-template name="set-collage-gsfvar-if-exists">
+      <xsl:with-param name="varName">bgcolor</xsl:with-param>
+    </xsl:call-template>
+    -->   
+  </xsl:template>
+
+  <!-- https://our.umbraco.com/forum/developers/xslt/9274-Return-Value-from-a-Template -->
+  <xsl:template name="set-collage-gsfvar-if-exists">
+    <xsl:param name="varName" />
+    <!--<xsl:value-of select="$varName"/>-->
+    <xsl:choose>
+      <xsl:when test="option[@name=$varName]/@value">
+	<gsf:variable name="$varName">
+	  <!--<xsl:attribute name="name"><xsl:value-of select="$varName" /></xsl:attribute>-->
+	  <xsl:value-of select="option[@name=$varName]/@value"/>
+	</gsf:variable>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:template>
   
 </xsl:stylesheet>
Index: /main/trunk/greenstone3/web/interfaces/default/transform/pages/classifier.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/default/transform/pages/classifier.xsl	(revision 38991)
+++ /main/trunk/greenstone3/web/interfaces/default/transform/pages/classifier.xsl	(revision 38992)
@@ -148,121 +148,4 @@
   </xsl:template>
 
-  <xsl:template name="get-collage-settings">
-    <!-- Creates gsf variables (which sets XSL and JavaScript vars) for any user configured
-	 Collage Classifier options coming through collectionConfig and then buildConfig,
-	 so that JavaScript can pass them to the webswing instance on starting it up. -->
-    <xsl:choose>
-        <xsl:when test="option[@name='geometry']/@value">
-	  <gsf:variable name="collagewidth">
-	    <xsl:value-of select="substring-before(option[@name='geometry']/@value, 'x')" />
-	  </gsf:variable>
-	  <gsf:variable name="collageheight">
-	    <xsl:value-of select="substring-after(option[@name='geometry']/@value, 'x')" />
-	  </gsf:variable>
-	</xsl:when>
-    </xsl:choose>
-    
-    <xsl:choose>
-      <xsl:when test="option[@name='verbosity']/@value">
-	<gsf:variable name="verbosity">
-	  <xsl:value-of select="option[@name='verbosity']/@value"/>
-	</gsf:variable>
-      </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-      <xsl:when test="option[@name='imageMustNotHave']/@value">
-	<gsf:variable name="imageMustNotHave">
-	  <xsl:value-of select="option[@name='imageMustNotHave']/@value"/>
-	</gsf:variable>
-      </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-      <xsl:when test="option[@name='imageType']/@value">
-	<gsf:variable name="imageType">
-	  <xsl:value-of select="option[@name='imageType']/@value"/>
-	</gsf:variable>
-      </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-      <xsl:when test="option[@name='maxDepth']/@value">
-	<gsf:variable name="maxDepth">
-	  <xsl:value-of select="option[@name='maxDepth']/@value"/>
-	</gsf:variable>
-      </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-      <xsl:when test="option[@name='maxDisplay']/@value">
-	<gsf:variable name="maxDisplay">
-	  <xsl:value-of select="option[@name='maxDisplay']/@value"/>
-	</gsf:variable>
-      </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-      <xsl:when test="option[@name='refreshDelay']/@value">
-	<gsf:variable name="refreshDelay">
-	  <xsl:value-of select="option[@name='refreshDelay']/@value"/>
-	</gsf:variable>
-      </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-      <xsl:when test="option[@name='isJava2']/@value">
-	<gsf:variable name="isJava2">
-	  <xsl:value-of select="option[@name='isJava2']/@value"/>
-	</gsf:variable>
-      </xsl:when>
-    </xsl:choose>
-    <xsl:choose>
-      <xsl:when test="option[@name='bgcolor']/@value">
-	<gsf:variable name="bgcolor">
-	  <xsl:value-of select="option[@name='bgcolor']/@value"/>
-	</gsf:variable>
-      </xsl:when>
-    </xsl:choose>
-    
-    <!-- 
-	 Defaults to fall back on when there is no user customisation
-	 can be manually adjusted here. -->
-    <!--    
-    <xsl:call-template name="set-collage-gsfvar-if-exists">
-      <xsl:with-param name="varName">imageMustNotHave</xsl:with-param>
-    </xsl:call-template>    
-    <xsl:call-template name="set-collage-gsfvar-if-exists">
-      <xsl:with-param name="varName">imageType</xsl:with-param>
-    </xsl:call-template>    
-    <xsl:call-template name="set-collage-gsfvar-if-exists">
-      <xsl:with-param name="varName">verbosity</xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="set-collage-gsfvar-if-exists">
-      <xsl:with-param name="varName">maxDepth</xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="set-collage-gsfvar-if-exists">
-      <xsl:with-param name="varName">maxDisplay</xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="set-collage-gsfvar-if-exists">
-      <xsl:with-param name="varName">refreshDelay</xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="set-collage-gsfvar-if-exists">
-      <xsl:with-param name="varName">isJava2</xsl:with-param>
-    </xsl:call-template>
-    <xsl:call-template name="set-collage-gsfvar-if-exists">
-      <xsl:with-param name="varName">bgcolor</xsl:with-param>
-    </xsl:call-template>
-    -->   
-  </xsl:template>
-
-  <!-- https://our.umbraco.com/forum/developers/xslt/9274-Return-Value-from-a-Template -->
-  <xsl:template name="set-collage-gsfvar-if-exists">
-    <xsl:param name="varName" />
-    <!--<xsl:value-of select="$varName"/>-->
-    <xsl:choose>
-      <xsl:when test="option[@name=$varName]/@value">
-	<gsf:variable name="$varName">
-	  <!--<xsl:attribute name="name"><xsl:value-of select="$varName" /></xsl:attribute>-->
-	  <xsl:value-of select="option[@name=$varName]/@value"/>
-	</gsf:variable>
-      </xsl:when>
-    </xsl:choose>
-  </xsl:template>
-  
   <xsl:template name="Collage_javascript_deprecated">
     <script type="text/javascript" src="interfaces/{$interface_name}/js/collage_scripts.js"><xsl:text> </xsl:text></script>
