euler
euler

Reputation: 1411

How to move community or collection logo in DSpace xmlui?

I would like to move the community or collection logo from its current position which is under the Search within this community/collection: form. I would like to put the logo above the <div id="aspect_artifactbrowser_CollectionViewer_div_collection-home" class="ds-static-div primary repository collection"> just below the community/collection name OR to the right of <div id="aspect_artifactbrowser_CollectionViewer_div_collection-search-browse" class="ds-static-div secondary search-browse">. I don't know which template to use or how to override it.

I tried this template:

<xsl:template match="dri:div[@id='aspect.artifactbrowser.CollectionViewer.div.collection-search-browse']">
    <xsl:apply-templates select="./mets:fileSec/mets:fileGrp[@USE='LOGO']"/>
</xsl:template>

The template match above removed the Browse by buttons and the search form.

Upvotes: 2

Views: 435

Answers (1)

schweerelos
schweerelos

Reputation: 2189

Your template removes all behaviour that would normally happen for dri:div[@id='aspect.artifactbrowser.CollectionViewer.div.collection-search-browse'] rather than adding additional bits to it.

To add the logo, you will need to

  • find the template that would normally be called for that dri:div (which depends on your theme - are you using Mirage 2?),
  • copy the contents of that template into your template
  • add additional stuff to your template that pulls in the logo.

There is another issue with your approach: You're mixing mets and dri in your template, same issue as in your other question (see response by Tim Donohue). To access the mets content from within the dri context, you need to load the collection's/community's mets file via a document() call, see eg here in Mirage 2.

Upvotes: 1

Related Questions