El dia dl 04 nov 2013 16:55:10 CET, RUIZ MORENO, ROBERT va escriure:
Hi everyone,

I'm using DSpace 3.1 XMLUI.

I need to hide the Discovery Facets shown, but only in the homepage.
Any approach or code to do this?

Thanks in advance
Robert


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk


_______________________________________________
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

Hi Robert,

We've also disabled the facets in the home page, so I'm attaching a patch with the changes. I'm not sure this is the best way to do so, but it works :)

Cheers,
Àlex
diff --git a/dspace-xmlui/src/main/webapp/themes/dri2xhtml-alt/core/navigation.xsl b/dspace-xmlui/src/main/webapp/themes/dri2xhtml-alt/core/navigation.xsl
index 022d6ca..f08c634 100644
--- a/dspace-xmlui/src/main/webapp/themes/dri2xhtml-alt/core/navigation.xsl
+++ b/dspace-xmlui/src/main/webapp/themes/dri2xhtml-alt/core/navigation.xsl
@@ -119,6 +119,22 @@
         </div>
     </xsl:template>
 
+    <!-- Disable Discovery facets on the home page -->
+    <xsl:template match="dri:options/dri:list[@id='aspect.discovery.Navigation.list.discovery']" priority="5">
+        <xsl:if test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='request' and @qualifier='URI'] != ''">
+            <!-- Copied from the next rule (dri:options/dri:list[dri:list]). -->
+            <xsl:apply-templates select="dri:head"/>
+            <div>
+                <xsl:call-template name="standardAttributes">
+                    <xsl:with-param name="class">ds-option-set</xsl:with-param>
+                </xsl:call-template>
+                <ul class="ds-options-list">
+                    <xsl:apply-templates select="*[not(name()='head')]" mode="nested"/>
+                </ul>
+            </div>
+        </xsl:if>
+    </xsl:template>
+
 
     <!-- The template that applies to lists directly under the options tag that have other lists underneath
         them. Each list underneath the matched one becomes an option-set and is handled by the appropriate
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
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

Reply via email to