en:user:berry_baskets
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
en:user:berry_baskets [2018/07/29 23:45] – kjdon | en:user:berry_baskets [2019/10/02 01:51] – [Using dc.Title instead of Title in Berry Basket display] kjdon | ||
---|---|---|---|
Line 12: | Line 12: | ||
==== Metadata ==== | ==== Metadata ==== | ||
+ | |||
+ | If you want to add an extra metadata field to the display, then you need to specify that metadata in web/ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Then restart Tomcat. | ||
+ | |||
+ | By default, these specified metadata elements will just get added to the item's display, e.g. at the bottom of the metadata lists in the ' | ||
+ | |||
+ | If you want to customise the display, take a look at the javascript code. web/ | ||
+ | |||
+ | === Using dc.Title instead of Title in Berry Basket display === | ||
+ | |||
+ | By default, the berry basket entries display Title metadata. If the linked item is a section, it will also display the book Title (root_Title). | ||
+ | |||
+ | If we have a collection that doesn' | ||
+ | |||
+ | 1. Edit web/ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | 2. Edit web/ | ||
+ | |||
+ | Look for generateDocDisplay and edit it: | ||
+ | < | ||
+ | Replace: | ||
+ | a.href=generateURL(doc); | ||
+ | a.appendChild(document.createTextNode(doc[' | ||
+ | with either: | ||
+ | 1. Use this if all documents have dc.Title instead of Title | ||
+ | |||
+ | a.href=generateURL(doc); | ||
+ | a.appendChild(document.createTextNode(doc[' | ||
+ | |||
+ | or: | ||
+ | 2. use this if some documents have Title and some have dc.Title | ||
+ | |||
+ | a.href=generateURL(doc); | ||
+ | if (doc[' | ||
+ | | ||
+ | } else if (doc[' | ||
+ | | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | This will now display dc.Title instead of Title for the title link to the document in the full view. | ||
+ | However, as dc.Title is not defined as one of the standard metadatas, it also gets added to the end of the display. To prevent this, either add it to the default_metas list at the top of the file, or modify generateDocDisplay further. | ||
+ | < | ||
+ | Replace: | ||
+ | for (var metaItem in doc) { | ||
+ | if ( !default_metas.includes(metaItem)){ | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | |||
+ | with: | ||
+ | for (var metaItem in doc) { | ||
+ | if ( !default_metas.includes(metaItem) && metaItem != ' | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | In the text and email view, all metadata is displayed in a list: First the hard-wired ones, then any that are not in the default list. So the dc.Title metadata just gets added to the list. If you added dc.Title to default_metas list as mentioned above, then you need to manually add it to the display to get it to appear. | ||
+ | |||
+ | For example, in populateUrlsAndMetadata(), | ||
+ | < | ||
+ | if (doc[' | ||
+ | metadata += " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | |||
==== Document Link ==== | ==== Document Link ==== | ||
Line 35: | Line 120: | ||
</ | </ | ||
- | Similarly, use document_link_collections to set the excpetions | + | Similarly, use document_link_collections to set the exceptions |
+ | ===== Setting up the Email Results Functionality ===== | ||
+ | This applies to nightly releases and the upcoming 3.09 release. Emailing the results didn't work properly in 3.08. | ||
+ | |||
+ | Please edit resources/ | ||
+ | |||
+ | < | ||
+ | #outgoing mail setup. | ||
+ | # by default it will use port 25 on localhost. Uncomment and modify | ||
+ | # these settings to use another mail server | ||
+ | # sample values are for gmail setup | ||
+ | # Note for gmail, you will need to enable account access for less secure apps | ||
+ | # for this to work. https:// | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # port number, | ||
+ | # | ||
+ | # | ||
+ | # set the following to ssl or tls | ||
+ | # | ||
+ | </ |
en/user/berry_baskets.txt · Last modified: 2023/07/24 01:44 by kjdon