Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added example for creating additional facets in the community and collection browse boxes

...

Code Block
languagexml
themeEclipse
<bean
	class="org.dspace.discovery.configuration.DiscoveryViewConfiguration">				
	<property name="metadataHeadingFields">								
		<list>
			<bean
				class="org.dspace.discovery.configuration.DiscoveryViewFieldConfiguration">
				<property name="mandatory" value="true"/>
				<property name="preHtml" value="&lt;h4 class='text-primary'&gt;" />
				<property name="postHtml" value="&lt;/h4&gt;" />
				<property name="field" value="name" />
				<property name="decorator" value="title" />
			</bean>
		</list>
	</property>
	<property name="metadataDescriptionFields">
		<list>
			<bean
				class="org.dspace.discovery.configuration.DiscoveryViewFieldConfiguration">
				<property name="field" value="dc.description.abstract" />
				<property name="preHtml" value="&lt;span&gt;" />
				<property name="postHtml" value="&lt;/span&gt;" />
			</bean>
		</list>
	</property>
</bean>	

Examples

Add facets to all Communities' or Collections' Browse boxes

The default Browse box that is displayed when viewing a community includes five buttons that determine what will be displayed in the browse list: Issue Date, Author, Title, Subject and Department.

The contents of these browse-lists depend on indexes that are configured in dspace.cfg with the webui.browse.index.<n> label:

Code Block
webui.browse.index.1 = dateissued:item:dateissued
webui.browse.index.2 = author:metadata:dc.contributor.*,dc.creator:text
webui.browse.index.3 = title:item:title
webui.browse.index.4 = subject:metadata:dc.subject.*:text
webui.browse.index.5 = rpname:crisrp:rpname
webui.browse.index.6 = rpdept:metadata:crisrp.dept:text
webui.browse.index.7 = pjtitle:crisproject:crisproject
webui.browse.index.8 = ouname:crisou:ouname
webui.browse.index.9 = itemdept:metadata:crisitem.author.dept:text
webui.browse.index.10 = type:metadata:dc.type:text

The buttons displayed in the Browse boxes of the communities and collections are determined by the webui.browse.community.index and webui.browse.collection.index fields:

Code Block
webui.browse.community.index = 1,2,3,4,9
webui.browse.collection.index = 1,2,3,4,9

Accordingly, the Issue Date, Author, Title, Subject and Department buttons are displayed in the communities and collections Browse boxes.

Assuming your metadata has an appropriate field defined, it can be used to populate an additional index, which can then be viewed using a Browse button. This example will demonstrate adding a 'Submit Date' button.

First add the webui.browse.index with an appropriate sequential number:

Code Block
webui.browse.index.11 = dateaccessioned:item:dateaccessioned

Next, add that number to the community and/or collection indexes:

Code Block
webui.browse.community.index = 1,2,3,4,9,11
webui.browse.collection.index = 1,2,3,4,9,11

Restart Tomcat, then recreate the discovery indexes to populate them with data from the dc.date.accessioned field:

Code Block
bin/dspace index-discovery -b -f