I'm trying to modify the Mirage theme in DSpace 4.2 to cater to the specific needs of my organization. We want to add our own search box with custom search fields, and modify the search results page.
This is how the default dspace search results page looks like:
After tinkering around with the css
and xsl
I came up with this layout:
The top search panel was added by me by modifying the page-structure.xsl
file. Now, I want to remove the default search box which appears in the results page. I've looked into all the css
, xsl
and sitemap
files.
By inspecting the sitemap files I found that the search is carried out by calling the [dspace-source]/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/discovery/SimpleSearch.java
file.
I commented the code sections where the search box was being added, and re-built and re-deployed dspace, but still no success.
Maybe, I'm not looking at the right files, due to lack of understanding.
It would be nice if someone points me in the right direction. Thanks in advance
You can override the template that generates the search box. In [dspace]/webapps/xmlui/themes/Mirage/Mirage.xsl
put this after the <xsl:output indent="yes"/>
line:
<xsl:template match="dri:div[@id='aspect.discovery.SimpleSearch.div.discovery-search-box']">
<!-- You can also add content here
to replace the default search box
-->
</xsl:template>