2016-06-09 54 views

回答

1

要添加其他内容到页面你有两个选择:

一种选择是定制Contact.addBody。例如:

public void addBody(Body body) throws ... { 
    [...] 
    contact.addPara("For urgent matters call 555-666-777."); 
} 

使用IDE自动完成,看看你可以添加什么样的元素。有基本的HTML元素的等价物。请参阅DRI Schema Reference以更好地理解它。

另一种选择是通过一个XSL文件添加内容:

首先,创建dspace-xmlui-mirage2/src/main/webapp/xsl/aspect/artifactbrowser/contact.xsl具有以下内容(假设幻影2主题):

<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> 

然后,在添加的基准的dspace-xmlui-mirage2/src/main/webapp/xsl/theme.xsl结束:

<xsl:import href="aspect/artifactbrowser/contact.xsl"/> 
+0

我只想在联系页面上添加更多信息。 –

+0

我已经用你所需要的更新了这个问题。 –