通常发现是这样的:
我想仅在搜索结果页面或任何其他页面上指定隐藏发现页面?可能吗?
我在这个例子中使用CSS隐藏:
我的discovery.xml文件:
<xsl:stylesheet xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
xmlns:mets="http://www.loc.gov/METS/"
xmlns:xlink="http://www.w3.org/TR/xlink/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:mods="http://www.loc.gov/mods/v3"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="i18n dri mets xlink xsl dim xhtml mods dc">
<xsl:output indent="yes"/>
<xsl:template match="dri:options">
<xsl:if test="$request-uri != ''">
<div id="navigation">
<span class="logoEducapes">Logo Educapes</span>
<span class="logoCapes">Logo Capes</span>
<aside>
<div id="ds-options">
<xsl:apply-templates/>
<!-- DS-984 Add RSS Links to Options Box -->
<xsl:if test="count(/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='feed']) != 0">
<nav>
<h2 id="ds-feed-option-head" class="ds-option-set-head">
<i18n:text>xmlui.feed.header</i18n:text>
</h2>
<div class="menu" style="display:none;">
<div id="ds-feed-option" class="ds-option-set">
<ul>
<xsl:call-template name="addRSSLinks"/>
</ul>
</div>
</div>
</nav>
</xsl:if>
</div>
<h2 class="h2h"><p class="title">CENTRAL DE<br/><i18n:text>xmlui.central.contents</i18n:text></p></h2>
<ul class="lista-padrao3">
<li>
<a href="/xmlui/discover?filtertype=type&filter_relational_operator=equals&filter=vídeo">
<span class="s1"></span><p class="ppar2"><i18n:text>xmlui.central.type.video</i18n:text></p>
</a>
</li>
<li>
<a href="/xmlui/discover?filtertype=type&filter_relational_operator=equals&filter=áudio">
<span class="s2"></span><p class="ppar2"><i18n:text>xmlui.central.type.audio</i18n:text></p>
</a>
</li>
<li>
<a href="/xmlui/discover?filtertype=type&filter_relational_operator=equals&filter=imagem">
<span class="s3"></span><p class="ppar2"><i18n:text>xmlui.central.type.imagem</i18n:text></p>
</a>
</li>
<li>
<a href="/xmlui/discover?filtertype=type&filter_relational_operator=equals&filter=texto">
<span class="s4"></span><p class="ppar2"><i18n:text>xmlui.central.type.texto</i18n:text></p>
</a>
</li>
<li>
<a href="/xmlui/discover?filtertype=type&filter_relational_operator=equals&filter=outro">
<span class="s5"></span><p class="ppar2"><i18n:text>xmlui.central.type.other</i18n:text></p>
</a>
</li>
</ul>
</aside>
</div>
</xsl:if>
</xsl:template>
<!--give nested navigation list the class sublist-->
<xsl:template match="dri:options/dri:list/dri:list" priority="3" mode="nested">
<li>
<xsl:apply-templates select="dri:head" mode="nested"/>
<ul class="ds-simple-list sublist">
<xsl:apply-templates select="dri:item" mode="nested"/>
</ul>
</li>
</xsl:template>
<!-- Add each RSS feed from meta to a list -->
<xsl:template name="addRSSLinks">
<xsl:for-each select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='feed']">
<li>
<a>
<xsl:attribute name="href">
<xsl:value-of select="."/>
</xsl:attribute>
<xsl:attribute name="style">
<xsl:text>background: url(</xsl:text>
<xsl:value-of select="$context-path"/>
<xsl:text>/static/icons/feed.png) no-repeat</xsl:text>
</xsl:attribute>
<xsl:choose>
<xsl:when test="contains(., 'rss_1.0')">
<xsl:text>RSS 1.0</xsl:text>
</xsl:when>
<xsl:when test="contains(., 'rss_2.0')">
<xsl:text>RSS 2.0</xsl:text>
</xsl:when>
<xsl:when test="contains(., 'atom_1.0')">
<xsl:text>Atom</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@qualifier"/>
</xsl:otherwise>
</xsl:choose>
</a>
</li>
</xsl:for-each>
</xsl:template>
<!-- Quick patch to remove empty lists from options -->
<xsl:template match="dri:options//dri:list[count(child::*)=0]" priority="5" mode="nested">
</xsl:template>
<xsl:template match="dri:options//dri:list[count(child::*)=0]" priority="5">
</xsl:template>
</xsl:stylesheet>
我正在考虑通过URL限制某些方法,但尚未得到任何结果。
答案 0 :(得分:1)
discovery.xml文件包含2个配置。一个用于集合的配置和另一个用于“主页”的配置。
https://github.com/DSpace/DSpace/blob/master/dspace/config/spring/api/discovery.xml#L42-L46
如果您修改“主页”的构面列表,则可以从着陆页和搜索结果页中删除不需要的构面。
https://github.com/DSpace/DSpace/blob/master/dspace/config/spring/api/discovery.xml#L204-L207