User Tools

Site Tools


en:user:favourites

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
en:user:favourites [2023/07/24 21:48] – [Customizing Favourites] kjdonen:user:favourites [2024/02/12 23:42] (current) – [Customizing Favourites] kjdon
Line 42: Line 42:
 The displayFavourite template displays a link to the source doc (eg pdf/image etc) plus the document title which is linked to the greenstone version of the document. The displayPlainText template makes a plain text version, with no HTML markup, suitable for use in an email or in the copy buffer. The displayFavourite template displays a link to the source doc (eg pdf/image etc) plus the document title which is linked to the greenstone version of the document. The displayPlainText template makes a plain text version, with no HTML markup, suitable for use in an email or in the copy buffer.
  
-Web/sites/localsite/siteConfig.xml is where the FavouriteBasket ServiceRack is added to the library. In here we can customise the display for a particular site - by default, the documentNode templates above are just repeated here. Note, in order to be able to add collection specific formatting, this site-wide format element needs to be present.+web/sites/localsite/siteConfig.xml is where the FavouriteBasket ServiceRack is added to the library. In here we can customise the display for a particular site - by default, the documentNode templates above are just repeated here. Note, in order to be able to add collection specific formatting, this site-wide format element needs to be present. 
 + 
 +<code> 
 +   <serviceRack name="FavouriteBasket"> 
 +      <format> 
 +        <!-- set the following to true is you have an email service on the server, or if you have setup mail server properties in resources/web/global.properties.in--> 
 +        <gsf:option name="serverEmail" value="false"/> 
 +        <!-- default template used for email/copy--> 
 +        <xsl:template match="documentNode" mode="plain-text"> 
 +          <xsl:call-template name="displayPlainText"/> 
 +        </xsl:template> 
 +        <!-- default template used for favourites display --> 
 +        <xsl:template match="documentNode"> 
 +          <xsl:call-template name="displayFavourite"/> 
 +        </xsl:template> 
 +      </format> 
 +    </serviceRack> 
 +</code>
  
 A collection can specify its own customisation for documents from that collection in the favourites list. In this case, we have to put it in a special place: inside a top level ccServices element (cross collection services), specifying which service the format element is for. A collection can specify its own customisation for documents from that collection in the favourites list. In this case, we have to put it in a special place: inside a top level ccServices element (cross collection services), specifying which service the format element is for.
en/user/favourites.txt · Last modified: 2024/02/12 23:42 by kjdon