Ghufran Khalil
Ghufran Khalil

Reputation: 51

Dspace Advance search XMLUI Customizaiton

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

<code>Filter</code>

I want this types in filter

Upvotes: 1

Views: 354

Answers (1)

terrywb
terrywb

Reputation: 3956

You will need to add a new facet in the discovery XML file.

Define facet

<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.

Search Filters

   <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>

Sidebar facet (if desired)

    <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

Related Questions