Changeset 38825 for main/trunk


Ignore:
Timestamp:
2024-03-11T11:15:43+13:00 (3 months ago)
Author:
kjdon
Message:

mods to gsf:getCollectionText to allow propertyFile attribute if it doens't have the default name (currently interface_custom). ALso deleted getCOllectionText1 - this doesn't work, probably committed by mistake, a leftover form testing new version???

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/expand-gsf.xsl

    r38352 r38825  
    533533   
    534534    <!-- With gsf:collectionText, a user can request a string from the collection's dictionary in the current lang -->
    535     <xsl:template match="gsf:collectionText1" name="gsf:collectionText1">
    536         <xslt:variable name="collName" select="/page/pageResponse/collection/@name"/>
    537         <xslt:copy-of select="util:getCollectionText($collName, $site_name, /page/@lang, '{@name}', '{@args}')/node()"/>
    538         </xsl:template>
     535    <!-- the default dictionary is interface_custom. To change the dictionary, use @propertyFile arg -->
    539536    <xsl:template match="gsf:collectionText" name="gsf:collectionText">
    540         <xsl:copy-of select="util:getCollectionText($collName, $site_name, $lang, @name, @args)/node()"/>
    541     </xsl:template>
    542 
     537      <xsl:choose>
     538            <xsl:when test="@propertyFile">
     539          <xsl:copy-of select="util:getCollectionText($collName, $site_name, @propertyFile, $lang, @name, @args)/node()"/>
     540        </xsl:when>
     541        <xsl:otherwise>
     542          <xsl:copy-of select="util:getCollectionText($collName, $site_name, $lang, @name, @args)/node()"/>
     543        </xsl:otherwise>
     544      </xsl:choose>
     545    </xsl:template>
    543546
    544547    <!-- if this gsf:metadata is a child of a document node then we want to get the metadata for that node -->
Note: See TracChangeset for help on using the changeset viewer.