Skip to content
Ondřej Košarko edited this page Jan 27, 2016 · 2 revisions

Overlays are a way of introducing your local changes to themes or even source code without making the working directory dirty. This is done in order to make updates as seamless as possible.

The overlays are done in such a way that when you place a file in a specific directory the file you've provided will be used instead of the file that's provided as the part of the repository.

The specific directory is [dspace-source]/dspace/modules/.

Examples

Changing the idp discovery UI

You'll notice, when signing in, the UI heading is "Sign in to LINDAT/CLARIN repository"; now your wish is to change this to the name of your repository.

The string is located in aai_config.js (full documentation for this config file is in a different project), but you don't want to modify the file in it's current location. Instead copy it to [dspace-source]/dspace/modules/xmlui/src/main/webapp/themes/UFAL/lib/js/ and edit it there. The file you've now created will (on deploy) overwrite the file we provide in the sources.

Few things to notice:

  • the original file is in dspace-xmlui module so you are copying it to .../modules/xmlui/
  • the (rest of the) path stays the same

Changing logos

When you want to change the LINDAT/CLARIN logo for the logo of your institution, there are multiple ways you can take:

  • overlay the logo file
    • this differs from the previous example only in the file that is being overlaid
    • bit cumbersome, because you'll have to name your logo lindat-logo.png
  • overlay the transformation file
    • after a bit of a search you find that the logo in the right hand navigation pane comes from navigation.xsl again you copy this file "keeping" its path. As before you edit this copy, you change the line starting with <img alt="LINDAT/CLARIN logo" mainly the src attribute. Change it for example to {$context-path}/themes/MY_THEME/images/my_logo.png
    • in the [dspace-source]/dspace/modules/xmlui/src/main/webapp/ directory create themes/MY_THEME/images and add you my_logo.png file
    • you have added a new file/directory with overlays
Clone this wiki locally