Hi Anja, there are a few resources out there for XMLUI; an older (but still good) one is http://www.slideshare.net/tdonohue/making-dspace-xmlui-your-own I see TDL have just released their training material for XMLUI themeing under a CC license, I haven't looked at it yet myself though: http://www.slideshare.net/DuraSpace/dspace-42-xmlui-theming For your specific question, look at the XML representation of the collection page, http://demo.dspace.org/xmlui/handle/10673/22?XML You'll see that the corresponding element is now <head>1st
sem</head> (the data on the test server re-sets every
Saturday, so it's no longer the same as in your question). This is
rendered in the HTML as < h2 class =" ds-div-head page-header
first-page-header "> 1st
sem </h2> So you will need to find templates that match dri:head elements and create first-page-header h2 elements. You don't say which theme you are looking at; essentially what I would do next is do a recursive grep through the theme directory to find such templates. (Keep in mind that eg the Mirage theme extends the dri2xhtml-alt theme as seen by the imports in Mirage.xsl, so if you're looking at Mirage, you need to run the grep in both of these theme directories.) In the case of Mirage2, rgrep -l first-page-header dspace-xmlui-mirage2/src/main/webapp/xsl/ shows dspace-xmlui-mirage2/src/main/webapp/xsl/core/elements.xsl dspace-xmlui-mirage2/src/main/webapp/xsl/aspect/artifactbrowser/item-view.xsl We aren't interested in items, so let's look at the first file. You'll see <xsl:template match="dri:div/dri:head" priority="3">
<xsl:call-template name="renderHead">
<xsl:with-param
name="class">ds-div-head</xsl:with-param>
</xsl:call-template>
</xsl:template> and <xsl:template name="renderHead">
<xsl:param name="class"/>
<xsl:variable name="head_count"
select="count(ancestor::dri:*[dri:head])"/>
<xsl:variable name="is_first_head_on_page"
select="(//dri:head)[1] = ."/>
<xsl:element name="h{$head_count+1}">
<xsl:call-template
name="standardAttributes">
<xsl:with-param name="class">
<xsl:value-of
select="$class"/>
<xsl:if test="$head_count = 1
and not($class='ds-option-set-head')">
<xsl:text>
page-header</xsl:text>
</xsl:if>
<xsl:if
test="$is_first_head_on_page">
<xsl:text>
first-page-header</xsl:text>
</xsl:if>
</xsl:with-param>
</xsl:call-template>
<xsl:apply-templates />
</xsl:element>
</xsl:template>
Now you could change these templates, However, these render _all_ head elements, regardless of which page you're looking at. To change just the ones on collection pages, I would make a custom template (in the main xsl file of your theme) that matches on eg dri:div[@n='collection-home']/dri:head
and does whatever processing is needed, with or without calling the
renderHead template. (For example, if you want to change the HTML
structure, there is probably no point in calling the renderHead
template. But if you just want to pre-pend the string "Collection: "
to the collection name, just call renderHead with "Collection: "
plus the actual name.) Likewise for community home pages; as you can
see from http://demo.dspace.org/xmlui/handle/10673/21?XML, your
custom template would then need to match dri:div[@n='community-home']/dri:head This is a little bit stream-of-consciousness, but I hope it makes sense to you and helps you understand how it all hangs together / where to find things in the XSL. cheers, Andrea On 03/03/15 03:10, Anja Radoicic wrote:
Hi, -- Dr Andrea Schweer IRR Technical Specialist, ITS Information Systems The University of Waikato, Hamilton, New Zealand |
------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________ 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