User Tools

Site Tools


en:user:gs3_sample_interface_modifications

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
en:user:gs3_sample_interface_modifications [2019/10/21 22:28] – [Changing the collection description] kjdonen:user:gs3_sample_interface_modifications [2019/10/21 22:29] – [Changing the collection description] kjdon
Line 46: Line 46:
 The default interface has these two statements already defined (in web/WEB-INF/classes/interface_default.properties): The default interface has these two statements already defined (in web/WEB-INF/classes/interface_default.properties):
 <code> <code>
-about.standarddescriptiondays=This collection contains {0-numdocs} documents and was last built {1-numdays} days ago. +about.standarddescriptiondays=This collection contains {0-numdocs} documents and was last built  
-about.standarddescriptiondate=This collection contains {0-numdocs} documents and was last built on {1-date}.+{1-numdays} days ago. 
 +about.standarddescriptiondate=This collection contains {0-numdocs} documents and was last built on  
 +{1-date}.
 </code> </code>
  
Line 53: Line 55:
 <code> <code>
 <xsl:variable name="raw_date"><gslib:collectionMeta name="buildDate"/></xsl:variable> <xsl:variable name="raw_date"><gslib:collectionMeta name="buildDate"/></xsl:variable>
-<xsl:variable name="formatted_date"><xsl:value-of select="util:formatTimeStamp($raw_date, 0, 3, /page/@lang)"/></xsl:variable>+<xsl:variable name="formatted_date"><xsl:value-of select="util:formatTimeStamp($raw_date, 0, 3, 
 + /page/@lang)"/></xsl:variable>
 <xsl:variable name="numdocs"><gslib:collectionMeta name="numDocs"/></xsl:variable> <xsl:variable name="numdocs"><gslib:collectionMeta name="numDocs"/></xsl:variable>
-<p><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.standarddescriptiondays', concat($numdocs, ';', $formatted_date))"/></p>+<p><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang,  
 +'about.standarddescriptiondays', concat($numdocs, ';', $formatted_date))"/></p>
 </code> </code>
  
Line 61: Line 65:
 Define the property there, eg: Define the property there, eg:
 <code> <code>
-descriptionextra=This very awesome collection was last built {0-days} ago, and contains {1-numdocs} manuscripts.+descriptionextra=This very awesome collection was last built {0-days} ago,  
 +and contains {1-numdocs} manuscripts.
 </code> </code>
  
 Then we use a similar utility function call that will look for the key in the custom file instead of the standard file: Then we use a similar utility function call that will look for the key in the custom file instead of the standard file:
 <code> <code>
-<xsl:value-of select="util:getCollectionText('lucene-jdbm-demo', $site_name, /page/@lang, 'descriptionextra', concat($formatted_date, ';', $numdocs))"/>+<xsl:value-of select="util:getCollectionText('lucene-jdbm-demo', $site_name,  
 +/page/@lang, 'descriptionextra', concat($formatted_date, ';', $numdocs))"/>
 </code> </code>
 Note we have changed the order in which we use the arguments, so we need to change the order we pass them in. Note we have changed the order in which we use the arguments, so we need to change the order we pass them in.
en/user/gs3_sample_interface_modifications.txt · Last modified: 2023/03/13 01:46 by 127.0.0.1