(Jump to other KnowledgeBases)
DSpace Resources
DSpace Website
DSpace Documentation
DSpace Wiki
DSpace Demo Site
Contribute to KnowledgBase
In this section you will learn you to add or remove options listed in the Browse By menu. You will need to edit the files dspace.cfg and message.xml then reindex and restart DSpace
Open dspace.cfg and find the heading "###### Browse Configuration ######" Scrolling down you will see uncommented lines that read " webui.browse.index…" this is where you will edit and add lines.
The browse functions are written as "webui.browse.index.# = [name]:metadata:[schema].[element].[qualifier]:[field type]"
Remove any browse fields you do not want and add lines for additional browse fields. In this example I I have added the field dc.subject.classification with the name "department" and field type text as well as date created with the name "datecreated" and the field type date.
Open message.xml and find the heading <!- org.dspace.app.xmlui.artifactbrowser.ConfigureableBrowse.java ->. You need to add four lines for each new browse category in this section. If you look through the section you will see the same lines for the preexisting browse categories scattered through the text.
First add "<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.[name].column_heading">[Browse Name]</message>" Where [name] is the name you assigned in dspace.cfg and [Browse Name] is the title you want to appear in browse menu in DSpace. These fields are the text displayed at the top of a browse list.
Then add the lines
<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.title.metadata.[name]">Browsing {0} by [Browse Field] {1}</message> <message key="xmlui.ArtifactBrowser.ConfigurableBrowse.trail.metadata.[name]">Browsing {0} by [Browse Field] </message>
Where [name] is the name you assigned in dspace.cfg and [Browse Field] is the field you are browsing by. These fields create the different browse page headings.
You will also need to add a line to artifactbrowser.Navigation.java section. Find the heading <!- org.dspace.app.xmlui.artifactbrowser.Navigation.java -> and you will see fields for the existing browse options.
Add the line
<message key="xmlui.ArtifactBrowser.Navigation.browse_[name]"></message>
Where [name] is the name you assigned in dspace.cfg and [Browse Field] is the field you are browsing by. These lines are the text displayed in the browse navigation bar.
Before existing items can be searched or browsed you need to re-index you instance.
Navigate to cd [dspace]/bin then type"./dspace index-init". After have finished indexing restart DSpace.
This section was contributed by Catalina Oyler from the Five Colleges of Ohio
8 Comments
Catalina Oyler
How do I add curly brackets around numbers to the text without making the wiki freak out? The lines for the browse headings should read "<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.title.metadata.[name]">Browsing
by [Browse Field]
</message>" and "<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.trail.metadata.[name]">Browsing
by [Browse Field] </message>"
But if I don't change the curl brackets my formatting goes crazy and some of the text disappears.
Catalina Oyler
Just like it did in the comment
Valorie Hollister
Hi Catalina - You need to let Confluence know that what you are writing is not a macro -- as the fancy brackets are used for all macro commands. You should use this syntax in the "Wiki Markup" tab when you are in edit mode:
I figure out how to show you the closing syntax -- because Confluence interprets the macro -- but at the end of your content you will want to close the command -- fancy bracket opencodefancy bracket close. I'll email you the syntax so it will be clear.
Yusuf Bayramoğlu
When I re-index, existing items can not be searched or browsed. I got only one item which was updated to test this index. I need to update last_modified data for all items then re-index in order to be indexed.
UPDATE public.item SET last_modified = current_timestamp;
Valorie Hollister
Hi Yusuf - This part of the wiki is a resource guide and is not intended to be a q&a forum. As you may know, the DSpace user community supports the software and the best place to ask for help is on the community mailing lists: http://dspace.org/Mailing-Lists.
Yusuf Bayramoğlu
I am not able to delete it.
Actually I did not aim to ask for help. I just want to share a workaround to a problem related with this topic. Beside this All links within the page you suggested are broken.
Yakup Dogan
Hi Valorie,
I work on the XMLUI of DSpace 4.2 and I followed the steps you described, but obviously it has no effect.
I added the following line to "dspace.cfg"
webui.browse.index.5 = identifier:metadata:dc.identifier.*:text
and the following 4 lines to "messages.xml"
<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.identifier.column_heading">Identifier</message>
<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.title.metadata.identifier">Browsing {0} by Identifier {1}</message>
<message key="xmlui.ArtifactBrowser.ConfigurableBrowse.trail.metadata.identifier">Browsing {0} by Identifier</message>
<message key="xmlui.ArtifactBrowser.Navigation.browse_identifier">Identifier</message>
Then I have reeindexed DSpace with
dspace index-discovery
and restarted it . But nothing happened.
I'm grateful for your help !
Valorie Hollister
Hi Yakup - This part of the wiki is a resource guide and is not intended to be a q&a forum. As you may know, the DSpace user community supports the software and the best place to ask for help is on the community mailing lists: http://dspace.org/Mailing-Lists. Best of luck!