答案 0 :(得分:1)
您需要在发现XML文件中添加新构面。
<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>
添加新构面后,您可以添加到过滤器列表,也可以添加到侧边栏构面。
<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>
在XMLUI中,您必须在i18n / messages.xml文件中为新的facet标题提供翻译。
<!-- 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>
此外,以下演示文稿介绍了如何将类型构面添加到DSpace集合中。
https://gitpitch.com/DSpace-Labs/DSpace-rel-demo/webinar?grs=github#/10