Ignore:
Timestamp:
2022-02-03T14:14:27+13:00 (2 years ago)
Author:
cstephen
Message:

Add experiemental space filler when TOC isn't displayed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-interfaces-dev/wmtb/transform/layouts/main.xsl

    r36042 r36045  
    130130      </div>
    131131
    132       <xsl:if test="not(/page/pageResponse/format[@type='display']/gsf:option[@name='sideBar']) or /page/pageResponse/format[@type='display']/gsf:option[@name='sideBar']/@value='true'">
    133         <!-- We need this for-each statement to select the right node -->
    134         <xsl:for-each select="/page/pageResponse/document">
    135           <xsl:call-template name="rightSidebarTOCAlt"/>
    136         </xsl:for-each>
    137       </xsl:if>
     132      <xsl:choose>
     133        <xsl:when test="not(/page/pageResponse/format[@type='display']/gsf:option[@name='sideBar']) or /page/pageResponse/format[@type='display']/gsf:option[@name='sideBar']/@value='true'">
     134          <xsl:variable name="documentCount" select="count(/page/pageResponse/document)" />
     135          <xsl:value-of select="$documentCount" />
     136
     137          <xsl:choose>
     138            <xsl:when test="$documentCount > 0">
     139              <!-- We need this for-each statement to select the right node -->
     140              <xsl:for-each select="/page/pageResponse/document">
     141                <xsl:call-template name="rightSidebarTOCAlt"/>
     142              </xsl:for-each>
     143            </xsl:when>
     144
     145            <!-- No sidebars were created, add spacer -->
     146            <xsl:otherwise>
     147              <xsl:call-template name="no-collapse-div" />
     148            </xsl:otherwise>
     149          </xsl:choose>
     150        </xsl:when>
     151
     152        <!-- The sidbar is disabled, add spacer -->
     153        <xsl:otherwise>
     154          <xsl:call-template name="no-collapse-div" />
     155        </xsl:otherwise>
     156      </xsl:choose>
    138157
    139158      <!-- <br class="clear" /> -->
     
    148167    </body>
    149168  </html>
     169</xsl:template>
     170
     171<xsl:template name="no-collapse-div">
     172  <div>
     173    <xsl:text> </xsl:text>
     174  </div>
    150175</xsl:template>
    151176
Note: See TracChangeset for help on using the changeset viewer.