User Tools

Site Tools


en:user:berry_baskets

Differences

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

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
en:user:berry_baskets [2018/07/29 23:38] – created kjdonen:user:berry_baskets [2018/07/30 00:08] – [Metadata] kjdon
Line 5: Line 5:
 ===== Activating Berry Baskets ===== ===== Activating Berry Baskets =====
  
-The library administrator can enable the Berry Basket functionality by including the BerryBasket serviveRack in the siteConfig.xml file. This is present by default: commenting it out will remove that functionality from the library.+The library administrator can enable the Berry Basket functionality by including the BerryBasket serviceRack in the siteConfig.xml file. This is present by default: commenting it out will remove that functionality from the library.
  
 The user can turn on this feature in the Preferences page. Once it is activated, little berries will appear in browsing lists and search results. These berries can be dragged into the basket that appears on the right hand side of the page. The user can turn on this feature in the Preferences page. Once it is activated, little berries will appear in browsing lists and search results. These berries can be dragged into the basket that appears on the right hand side of the page.
  
 +===== Customizing Berry Baskets =====
 +
 +==== Metadata ====
 +
 +If you want to add an extra metadata field to the display, then you need to specify that metadata in web/sites/localsite/siteConfig.xml. Look for the BerryBasket serviceRack and add a metadataList containing the desired elements. For example:
 +
 +<code>
 +<serviceRack name="BerryBaskets">
 +  <metadataList>
 +    <metadata name="dc.Creator"/>
 +    <metadata name="dc.Subject"/>
 +  </metadataList>
 +</serviceRack>
 +</code>
 +
 +By default, these will just get added to the item's display. If you want to customise the display, take a look at the code in web/interfaces/default/js/berrybasket/berrycheckout.js
 +==== Document Link ====
 +
 +By default the link in the basket will be to the Greenstone HTML version of the document. You can change this to link to the source document, eg the PDF version.
 +
 +Edit web/interfaces/default/js/berrybasket/berrycheckout.js.
 +
 +There are three variables at the top of this file:
 +<code>
 +var default_link_type = "document"; // or "source"
 +var source_link_collections = new Array();
 +var document_link_collections = new Array();
 +</code>
 +
 +The default_link_type specifies whether links are to the Greenstone versions ("document") or to the source eg PDF versions ("source"); If you then want to have a few collections done the opposite way, use source_link_collections/document_link_collections to list the exceptions.
 +
 +For example, if most collections use document, but pdfcoll and exampapers use source, then set the variables like this:
 +
 +<code>
 +var default_link_type = "document";
 +var source_link_collections = ["pdfcoll", "exampapers"];
 +</code>
 +
 +Similarly, use document_link_collections to set the excpetions if you have made the default "source".
  
  
en/user/berry_baskets.txt · Last modified: 2023/07/24 01:44 by kjdon