Ignore:
Timestamp:
2017-10-16T09:58:03+13:00 (7 years ago)
Author:
kjdon
Message:

modified collectionName template to either print name displayItem, or if that is not there, the collection's short name. removed teh all collections option. In the case that there is a place where you want all collections to be displayed when not in a specific colleciton, I have added collectionNameOrAll template, which is the old collectionName template.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/gslib.xsl

    r31954 r32045  
    6161  <xsl:template name="collectionName">
    6262    <xsl:choose>
     63      <xsl:when test="/page/pageResponse/collection/displayItemList/displayItem[@name='name']">
     64        <xsl:value-of select="/page/pageResponse/collection/displayItemList/displayItem[@name='name']"/>
     65      </xsl:when>
     66      <xsl:when test="/page/pageResponse/collection/@name">
     67    <xsl:value-of select="/page/pageResponse/collection/@name"/>
     68      </xsl:when>
     69    </xsl:choose>
     70  </xsl:template>
     71
     72    <!-- template to get the name of the current collection or 'all collections' if not in a specific collection -->
     73    <xsl:template name="collectionNameOrAll">
     74    <xsl:choose>
    6375      <xsl:when test="/page/pageResponse/collection">
    6476        <xsl:value-of select="/page/pageResponse/collection/displayItemList/displayItem[@name='name']"/>
     
    6779    </xsl:choose>
    6880  </xsl:template>
    69  
     81
    7082  <xsl:template name="collectionNameShort">
    7183    <xsl:value-of select="/page/pageResponse/collection/@name"/>
     
    370382    </xsl:for-each>
    371383  </xsl:template>
     384
    372385
    373386  <xsl:template name="libraryInterfaceLink">
Note: See TracChangeset for help on using the changeset viewer.