en:user:gslib
This version is outdated by a newer approved version.
This version (2019/09/23 22:43) is a draft.
Approvals: 0/1The Previously approved version (2019/09/23 22:42) is available.
This version (2019/09/23 22:43) is a draft.Approvals: 0/1The Previously approved version (2019/09/23 22:42) is available.

This is an old revision of the document!
gslib: XSL utility templates
Greenstone 3 has a gslib.xsl file which defines a lot of utility templates. These can be called simply by <gslib:templatename/>. They are basically just shortcuts to things.
For example, gslib.xsl defines the following template:
<xsl:template name="siteName"> <xsl:value-of select="/page/pageResponse/displayItemList/displayItem[@name='siteName']"/> </xsl:template>
This can be called using <gslib:siteName/>
It also defines some common variables, which can be accessed by all template files, using $variablename.
Variables
| $interface_name | The internal name of the current interface, eg 'default' |
| $library_name | The name of the library servlet, eg 'library' |
| $site_name | The internal name of the current site, eg 'localsite'. |
| $use_client_side_xslt | |
| $filepath | |
| $google_tracking_id |
| $berry_icon | |
| $unselected_favourite_icon | |
| $selected_favourite_icon | |
| $berrybasketswitch | |
| $favouritebasketswitch | |
| $berryBasketOn | |
| $favouriteBasketOn | |
| $documentBasketOn | |
| $thisCollectionEditor |
Templates
| <gslib:siteName/> | The display name of the site |
| <gslib:siteDescription/> | The description of the site |
| <gslib:siteLink/> | |
| <gslib:collections/> | |
| <gslib:collectionName/> | |
| <gslib:collectionNameShort/> | |
| <gslib:collectionNameLinked/> | |
| <gslib:collectionMeta name="xxx"/> | |
| <gslib:serviceName/> | |
| <gslib:textDirectionAttribute/> | |
| <gslib:actionClass/> | |
| <gslib:defaultDividerBar text="display text"/> | |
| <gslib:error/> | |
| <gslib:displayErrorsIfAny/> | |
| <gslib:/> | |
| <gslib:/> | |
| <gslib:/> | |
| <gslib:/> | |
| <gslib:/> | |
| <gslib:/> | |
| <gslib:/> | |
| <gslib:/> | |
| <gslib:/> | |
| <gslib:/> | |
| <gslib:/> | |
| <gslib:/> |
en/user/gslib.1569278595.txt.gz · Last modified: 2019/09/23 22:43 by kjdon
