en:user:favourites
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:user:favourites [2023/07/24 21:28] – [Setting up the Email Results Functionality] kjdon | en:user:favourites [2025/10/03 00:55] (current) – [Disable Favourites for one collection] kjdon | ||
---|---|---|---|
Line 2: | Line 2: | ||
====== Greenstone 3 Favourites ====== | ====== Greenstone 3 Favourites ====== | ||
- | //[ This page documents favourites for Greenstone 3 version 3.11. For 3.10 and earlier versions, please see our [[en: | + | //[ This page documents favourites for Greenstone 3 version 3.11 and later. For 3.10 and earlier versions, please see our [[en: |
The favourites functionality allows the user to collect up a set of interesting or useful documents as she is browsing through the library. Once they are finished, they can view the basket of links, and email it to themselves. | The favourites functionality allows the user to collect up a set of interesting or useful documents as she is browsing through the library. Once they are finished, they can view the basket of links, and email it to themselves. | ||
Line 14: | Line 14: | ||
A library can enable the favourites functionality using a servlet option. Favourites are enabled by default. To disable, please edit resources/ | A library can enable the favourites functionality using a servlet option. Favourites are enabled by default. To disable, please edit resources/ | ||
- | A user can enable/ | + | A user can enable/ |
< | < | ||
Line 22: | Line 22: | ||
</ | </ | ||
+ | Note, this doesn' | ||
+ | |||
+ | Second note, if you are testing this you may need to use a private browser window. Greenstone stores your settings between sessions and if it has stored the favourites being on, then this changing this setting in the library won't affect your current stored session. | ||
+ | |||
+ | ===== Disable Favourites for one collection ===== | ||
+ | |||
+ | If you would like to turn off favourites just for one collection, you can add a custom gslib.xsl into the collection' | ||
+ | |||
+ | Open a new file in the transform folder called gslib.xsl and add the following as its contents. | ||
+ | < | ||
+ | <?xml version=" | ||
+ | < | ||
+ | xmlns: | ||
+ | xmlns: | ||
+ | xmlns: | ||
+ | xmlns: | ||
+ | xmlns: | ||
+ | xmlns: | ||
+ | xmlns: | ||
+ | xmlns: | ||
+ | exclude-result-prefixes=" | ||
+ | |||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | </ | ||
===== Customizing Favourites ===== | ===== Customizing Favourites ===== | ||
+ | The links in the list of favourites can now be customised using format statements (like we use to customise document lists for browsing and searching). | ||
+ | The content of the favourites page is defined in web/ | ||
+ | The default templace for the documentNode is below. This will be used if there is no alternative specified in the FavouriteBasket ServiceRack, | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | 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/ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <!-- set the following to true is you have an email service on the server, or if you have setup mail server properties in resources/ | ||
+ | < | ||
+ | <!-- default template used for email/ | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | <!-- default template used for favourites display --> | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | 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. | ||
+ | |||
+ | For example: | ||
+ | < | ||
+ | < | ||
+ | <format service=" | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | The first template uses the default display template, but adds on dc.Creator metadata. The second template does away with the default altogether, and displays the dc.Title metadata, followed by the collection name in brackets. A pretty useless display, as it contains no link to the document, but just for illustrative purposes. | ||
===== Setting up the Email Results Functionality ===== | ===== Setting up the Email Results Functionality ===== |
en/user/favourites.1690234101.txt.gz · Last modified: 2023/07/24 21:28 by kjdon