Hi!
I just wanted to follow up on this. Thank you for the advice and direction. It
worked out great!
In case anyone ever wants to do something similar, this is what I ended up
doing.
In
[dspace-srcdir]/dspace/modules/xmlui-mirage2/src/main/webapp/xsl/core/navigation.xsl
Above the main body of code that's already there I inserted this:
xsl:template match=/response/result mode=searchLimiters
div class=radio
label
input id=ds-search-form-scope-all type=radio name=scope
value= checked=checked/
i18n:textxmlui.dri2xhtml.structural.search/i18n:text
/label
/div
xsl:for-each select=doc
div class=radio
label
input id=ds-search-form-scope-container type=radio
name=scope
xsl:attribute name=value
xsl:value-of
select=str[@name='handle'][text()]/
/xsl:attribute
/input
Search xsl:value-of
select=arr[@name='dc.title']/str[text()]/
/label
/div
/xsl:for-each
/xsl:template
Then I replaced lines 66-89 (the lines helix referenced) with the following two
lines:
xsl:variable name=solr-search-url
select=confman:getProperty('discovery', 'search.server')/
xsl:apply-templates select=document(concat($solr-search-url,
'/select?q=search.resourcetype:3amp;fl=handleamp;fl=dc.titleamp;omitHeader=true'))
mode=searchLimiters/
In order for the xsl:variable tag to work as expected, you will need to
follow the similar directions from here:
https://wiki.duraspace.org/display/DSPACE/Solr#Solr-QueryingSolrfromXMLUI
Thanks!
Ben
From: ivan.ma...@gmail.com [ivan.ma...@gmail.com] on behalf of helix84
[heli...@centrum.sk]
Sent: Wednesday, April 15, 2015 3:25 PM
To: Ben.Tech
Cc: dspace-tech@lists.sourceforge.net
Subject: Re: [Dspace-tech] XMLUI modification: search collections from front
page
This is where the This Collection radio button is rendered in Mirage2:
https://github.com/DSpace/DSpace/blob/dspace-5_x/dspace-xmlui-mirage2/src/main/webapp/xsl/core/navigation.xsl#L66-89
The simplest way would be to duplicate this code and render it for each
collection you want (xsl:for-each). But you have to get the collection names
and handles from somewhere and they're not in DRI of a community. I'd get them
directly from Solr this way:
https://wiki.duraspace.org/display/DSPACE/Solr#Solr-QueryingSolrfromXMLUI
Your Solr query (for all collections) could be:
http://localhost:8080/solr/search/select?q=search.resourcetype:3
Regards,
~~helix84
Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
--
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette