-
Notifications
You must be signed in to change notification settings - Fork 18
Overlays
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/
.
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
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, find the line starting with
<img alt="LINDAT/CLARIN logo"
change thesrc
attribute for example to{$context-path}/themes/MY_THEME/images/my_logo.png
change thealt
attribute for example toINSTITUTION logo
also on the parent a-element change thehref
attributes URL to point to your institution. -
in the
[dspace-source]/dspace/modules/xmlui/src/main/webapp/
directory createthemes/MY_THEME/images
and add youmy_logo.png
file -
you have added a new file/directory with overlays
-