How to customize or change the contact page of dspace 5.5 XMLUI? What files or configuration should I change?
Asked
Active
Viewed 1,035 times
2
-
2Have you read the [XMLUI Configuration and Customization documentation](https://wiki.duraspace.org/display/DSDOC5x/XMLUI+Configuration+and+Customization)? – Jonny Henly Jun 09 '16 at 19:00
-
@JonnyHenly is there anything on Contact and Feedback on this https://wiki.lyrasis.org/display/DSDOC5x/Mirage+Configuration+and+Customization page? – NIMISHAN Jun 22 '20 at 09:44
1 Answers
1
To add additional content to the page you have two options:
One option is to customize Contact.addBody. For example:
public void addBody(Body body) throws ... {
[...]
contact.addPara("For urgent matters call 555-666-777.");
}
Use the IDE autocompletion to see what kind of elements you can add. There are equivalents to the basic HTML elements. See DRI Schema Reference to understand it better.
The other option is to add the content through an XSL file:
First, create dspace-xmlui-mirage2/src/main/webapp/xsl/aspect/artifactbrowser/contact.xsl
(assuming Mirage 2 theme) with the following content:
<xsl:stylesheet
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="i18n dri xsl">
<xsl:output indent="yes"/>
<xsl:template match="dri:div[@id='aspect.artifactbrowser.Contact.div.contact']">
<xsl:apply-templates />
<!-- Add here any additional HTML: -->
<p>
For urgent matters call 555-666-777.
</p>
</xsl:template>
</xsl:stylesheet>
Then, add a reference at the end of dspace-xmlui-mirage2/src/main/webapp/xsl/theme.xsl
:
<xsl:import href="aspect/artifactbrowser/contact.xsl"/>

Àlex Magaz Graça
- 53
- 4