en:user:gslib
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.
gslib.xsl can be found in web/interfaces/default/transform/gslib.xsl.
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 defines HEAPS of templates. Here is just a few of them.
| <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:rightArrow/> | |
| <gslib:siteHomePageTitle/> | |
| <gslib:selectACollectionTextBar/> | |
| <gslib:crossCollectionQueciSearchForm/> | |
| <gslib:groupName path=""/> | |
| <gslib:groupDescription path=""/> | |
| <gslib:groupHref path=""/> | |
| <gslib:groupLinkWithImage/> | |
| <gslib:collectionLinkWithImage/> | |
| <gslib:/> | |
| <gslib:/> | |
| <gslib:/> |
en/user/gslib.1569278961.txt.gz · Last modified: 2019/09/23 22:49 by kjdon
