Reputation: 51
I want to change filter please help how can i do this.. I want meeting type document title into my filter search please help me..
Thanks in advance
Upvotes: 1
Views: 354
Reputation: 3956
You will need to add a new facet in the discovery XML file.
<bean id="searchFilterType" class="org.dspace.discovery.configuration.HierarchicalSidebarFacetConfiguration">
<property name="indexFieldName" value="type"/>
<property name="metadataFields">
<list>
<value>dc.type.*</value>
</list>
</property>
<property name="facetLimit" value="10"/>
<property name="sortOrderSidebar" value="COUNT"/>
<property name="sortOrderFilterPage" value="COUNT"/>
<property name="splitter" value="::"/>
</bean>
Once you have added your new facet, you can add to the filter list and optionally to the sidebar facets.
<property name="searchFilters">
<list>
<ref bean="searchFilterTitle" />
<ref bean="searchFilterAuthor" />
<ref bean="searchFilterSubject" />
<!-- Add new facet -->
<ref bean="searchFilterType" />
<ref bean="searchFilterIssued" />
<ref bean="searchFilterContentInOriginalBundle"/>
</list>
<property name="sidebarFacets">
<list>
<ref bean="searchFilterAuthor" />
<ref bean="searchFilterSubject" />
<!-- Add new facet -->
<ref bean="searchFilterType" />
<ref bean="searchFilterIssued" />
<ref bean="searchFilterContentInOriginalBundle"/>
</list>
In XMLUI, you must provide a translation for your new facet headers in your i18n/messages.xml file.
<!-- MAKING DSPACE YOUR OWN WEBNINAR ADDITIONS -->
<message key="xmlui.ArtifactBrowser.AdvancedSearch.type_type">Type</message>
<message key="xmlui.ArtifactBrowser.SimpleSearch.filter.type">Type</message>
<message key="xmlui.Discovery.AbstractSearch.type_type">Type</message>
Additionally, the following presentation describes how to add a type facet to a DSpace collection.
https://gitpitch.com/DSpace-Labs/DSpace-rel-demo/webinar?grs=github#/10
Upvotes: 1