Difference between revisions of "SUNScholar/XMLUI Theme/M1/Page Structure"
m |
m |
||
| Line 2: | Line 2: | ||
'''[[SUNScholar/XMLUI_Theme/M1/Modify|Back to Mirage 1 Modification]]''' | '''[[SUNScholar/XMLUI_Theme/M1/Modify|Back to Mirage 1 Modification]]''' | ||
</center> | </center> | ||
| + | |||
| + | ==Create custom navigation list== | ||
| + | <pre> | ||
| + | Hi Charlene, | ||
| + | |||
| + | In navigation.xsl, in the “dri:options” template, instead of: | ||
| + | |||
| + | <!-- Once the search box is built, the other parts of the options are added --> | ||
| + | <xsl:apply-templates/> | ||
| + | |||
| + | You should just be able to do: | ||
| + | |||
| + | <xsl:apply-templates select="dri:list[@n='browse']"/> | ||
| + | <xsl:apply-templates select="dri:list[@n='discovery']"/> | ||
| + | <xsl:apply-templates select="dri:list[@n='context']"/> | ||
| + | <xsl:apply-templates select="dri:list[@n='administrative']"/> | ||
| + | <xsl:apply-templates select="dri:list[@n='account']"/> | ||
| + | |||
| + | |||
| + | If you have any other custom lists, you’ll need to be sure to select for those as well. | ||
| + | |||
| + | |||
| + | Jacob Brown | ||
| + | </pre> | ||
| + | ===Related Java Code=== | ||
| + | *https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/discovery/Navigation.java#L123 | ||
| + | *https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/browseArtifacts/Navigation.java#L111 | ||
| + | *https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/artifactbrowser/Navigation.java#L114 | ||
==Remove Recent Submissions== | ==Remove Recent Submissions== | ||
| Line 163: | Line 191: | ||
{{NANO}} | {{NANO}} | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
==Move front page search above front page community list== | ==Move front page search above front page community list== | ||
Revision as of 09:30, 3 September 2014
Back to Mirage 1 Modification
Contents
- 1 Create custom navigation list
- 2 Remove Recent Submissions
- 3 Remove the "Register" link from the right navigation box
- 4 Remove duplicate "Community" browse link from the right navigation box
- 5 Remove duplicate "Search" input from the right navigation box
- 6 Remove duplicate "Login" link above the top banner logo
- 7 Move front page search above front page community list
Hi Charlene,
In navigation.xsl, in the “dri:options” template, instead of:
<!-- Once the search box is built, the other parts of the options are added -->
<xsl:apply-templates/>
You should just be able to do:
<xsl:apply-templates select="dri:list[@n='browse']"/>
<xsl:apply-templates select="dri:list[@n='discovery']"/>
<xsl:apply-templates select="dri:list[@n='context']"/>
<xsl:apply-templates select="dri:list[@n='administrative']"/>
<xsl:apply-templates select="dri:list[@n='account']"/>
If you have any other custom lists, you’ll need to be sure to select for those as well.
Jacob Brown
Related Java Code
- https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/discovery/Navigation.java#L123
- https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/browseArtifacts/Navigation.java#L111
- https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/artifactbrowser/Navigation.java#L114
Remove Recent Submissions
Hi Gary, Remove org.dspace.app.webui.components.RecentSiteSubmissions from plugin.sequence.org.dspace.plugin.SiteHomeProcessor in [dspace]/config/dspace.cfg for home page. and remove org.dspace.app.webui.components.RecentCommunitySubmissions from plugin.sequence.org.dspace.plugin.CommunityHomeProcessor for community home page. Regards, Keiji Suzuki
In the DSpace config file, set the following and rebuild.
xmlui.user.registration=false
Go to the following folder:
cd /home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes/Mytheme/lib/xsl/core
Open the following file:
nano navigation.xsl
Add the following to the top of the file:
<!-- Remove the "Community" link - H Gibson - 2012 --> <xsl:template name="disable-1st-link-in-browse-menu" match="dri:list[not(@type) and @id='aspect.browseArtifacts.Navigation.list.global']/dri:item[1]" mode="nested"> </xsl:template>
- NANO Editor Help
| CTL+O | = Save the file and then press Enter |
| CTL+X | = Exit "nano" |
| CTL+K | = Delete line |
| CTL+U | = Undelete line |
| CTL+W | = Search for %%string%% |
| CTL+\ | = Search for %%string%% and replace with $$string$$ |
| CTL+C | = Show line numbers |
More info = http://en.wikipedia.org/wiki/Nano_(text_editor)
Go to the following folder:
cd /home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes/Mytheme/lib/xsl/core
Open the following file:
nano navigation.xsl
Go to line 55 approx and comment out as follows or you can simply delete the text:
<!--
<form id="ds-search-form" method="post">
<xsl:attribute name="action">
<xsl:value-of
select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='search'][@qualifier='simpleURL']"/>
</xsl:attribute>
<fieldset>
<input class="ds-text-field " type="text">
<xsl:attribute name="name">
<xsl:value-of
select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='search'][@qualifier='queryField']"/>
</xsl:attribute>
</input>
<input class="ds-button-field " name="submit" type="submit" i18n:attr="value"
value="xmlui.general.go">
<xsl:attribute name="onclick">
<xsl:text>
var radio = document.getElementById("ds-search-form-scope-container");
if (radio != undefined && radio.checked)
{
var form = document.getElementById("ds-search-form");
form.action=
</xsl:text>
<xsl:text>"</xsl:text>
<xsl:value-of
select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='contextPath']"/>
<xsl:text>/handle/" + radio.value + "</xsl:text>
<xsl:value-of select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='search'][@qualifier='simpleURL']"/>
<xsl:text>" ; </xsl:text>
<xsl:text>
}
</xsl:text>
</xsl:attribute>
</input>
<xsl:if test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='focus'][@qualifier='container']">
<label>
<input id="ds-search-form-scope-all" type="radio" name="scope" value=""
checked="checked"/>
<i18n:text>xmlui.dri2xhtml.structural.search</i18n:text>
</label>
<br/>
<label>
<input id="ds-search-form-scope-container" type="radio" name="scope">
<xsl:attribute name="value">
<xsl:value-of
select="substring-after(/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='focus'][@qualifier='container'],':')"/>
</xsl:attribute>
</input>
<xsl:choose>
<xsl:when
test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='focus'][@qualifier='containerType']/text() = 'type:community'">
<i18n:text>xmlui.dri2xhtml.structural.search-in-community</i18n:text>
</xsl:when>
<xsl:otherwise>
<i18n:text>xmlui.dri2xhtml.structural.search-in-collection</i18n:text>
</xsl:otherwise>
</xsl:choose>
</label>
</xsl:if>
</fieldset>
</form>
-->
- NANO Editor Help
| CTL+O | = Save the file and then press Enter |
| CTL+X | = Exit "nano" |
| CTL+K | = Delete line |
| CTL+U | = Undelete line |
| CTL+W | = Search for %%string%% |
| CTL+\ | = Search for %%string%% and replace with $$string$$ |
| CTL+C | = Show line numbers |
More info = http://en.wikipedia.org/wiki/Nano_(text_editor)
Remove duplicate "Login" link above the top banner logo
Go to the following folder:
cd /home/dspace/source/dspace/modules/xmlui/src/main/webapp/themes/Mytheme/lib/xsl/core
Open the following file:
nano page-structure.xsl
Go to line 337 approx and comment out as follows or you can simply delete the text:
<!--
<xsl:choose>
<xsl:when test="/dri:document/dri:meta/dri:userMeta/@authenticated = 'yes'">
<div id="ds-user-box">
<p>
<a>
<xsl:attribute name="href">
<xsl:value-of select="/dri:document/dri:meta/dri:userMeta/
dri:metadata[@element='identifier' and @qualifier='url']"/>
</xsl:attribute>
<i18n:text>xmlui.dri2xhtml.structural.profile</i18n:text>
<xsl:value-of select="/dri:document/dri:meta/dri:userMeta/
dri:metadata[@element='identifier' and @qualifier='firstName']"/>
<xsl:text> </xsl:text>
<xsl:value-of select="/dri:document/dri:meta/dri:userMeta/
dri:metadata[@element='identifier' and @qualifier='lastName']"/>
</a>
<xsl:text> | </xsl:text>
<a>
<xsl:attribute name="href">
<xsl:value-of select="/dri:document/dri:meta/dri:userMeta/
dri:metadata[@element='identifier' and @qualifier='logoutURL']"/>
</xsl:attribute>
<i18n:text>xmlui.dri2xhtml.structural.logout</i18n:text>
</a>
</p>
</div>
</xsl:when>
<xsl:otherwise>
<div id="ds-user-box">
<p>
<a>
<xsl:attribute name="href">
<xsl:value-of select="/dri:document/dri:meta/dri:userMeta/
dri:metadata[@element='identifier' and @qualifier='loginURL']"/>
</xsl:attribute>
<i18n:text>xmlui.dri2xhtml.structural.login</i18n:text>
</a>
</p>
</div>
</xsl:otherwise>
</xsl:choose>
-->
- NANO Editor Help
| CTL+O | = Save the file and then press Enter |
| CTL+X | = Exit "nano" |
| CTL+K | = Delete line |
| CTL+U | = Undelete line |
| CTL+W | = Search for %%string%% |
| CTL+\ | = Search for %%string%% and replace with $$string$$ |
| CTL+C | = Show line numbers |
More info = http://en.wikipedia.org/wiki/Nano_(text_editor)
Move front page search above front page community list
See: http://sourceforge.net/p/dspace/mailman/message/31869335/
Hi Kev,
There are a couple of ways you could do that.
I'll write one that I think requires the least amount of work:
Put this in your theme's XSL file:
<xsl:template name="disable_front-page-search" match="dri:div[@id='aspect.discovery.SiteViewer.div.front-page-search']">
</xsl:template>
And the following block to the appropriate place in [dspace]/config/news-xmlui.xml.
This one assumes you have Discovery enabled; if you don't, just use the appropriate snippet from DRI and change the "id" attribute.
<div id="aspect.discovery.SiteViewer.div.front-page-search-custom" interactive="yes" rend="primary" action="/discover" n="front-page-search" method="get"> <head>Search DSpace</head> <p>Enter some text in the box below to search DSpace.</p> <p> <field id="aspect.discovery.SiteViewer.field.query" n="query" type="text"> <params/> </field> <field id="aspect.discovery.SiteViewer.field.submit" n="submit" type="button"> <params/> <value type="raw">Go</value> </field> </p> </div>
Regards,
~~helix84