On Sun, Oct 6, 2013 at 3:18 PM, KC Roa <[email protected]> wrote:
> I like to use the Mirage theme for my DSpace site, but of course, need
> to change some of its images/css. What's the best approach for this?
> Should I create a new theme and just copy the whole Mirage folder as my
> base theme then edit from there, or edit directly from the Mirage theme
> folder? Either answer, can you also give me sites that may help me as
> well? Thank you!

Hi KC Roa,

the approach I recommend is to create a new theme with its own .xsl and
sitemap.xmap file, copy over javascript, css and images and for all XSL
override the parent theme. The xsl should be located here:

[dspace]/webapps/xmlui/themes/YourTheme/YourTheme.xsl

and look like this:

<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet
xmlns:i18n="http://apache.org/cocoon/i18n/2.1";
        xmlns:dri="http://di.tamu.edu/DRI/1.0/";
        xmlns:mets="http://www.loc.gov/METS/";
        xmlns:xlink="http://www.w3.org/TR/xlink/";
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
        xmlns:dim="http://www.dspace.org/xmlns/dspace/dim";
        xmlns:xhtml="http://www.w3.org/1999/xhtml";
        xmlns:mods="http://www.loc.gov/mods/v3";
        xmlns:dc="http://purl.org/dc/elements/1.1/";
        xmlns="http://www.w3.org/1999/xhtml";
        exclude-result-prefixes="i18n dri mets xlink xsl dim xhtml mods dc">

    <xsl:import href="../Mirage/Mirage.xsl"/>
</xsl:stylesheet>


Then configure DSpace to use this theme instead of the default Mirage theme
in
[dspace]/config/xmlui.xconf

This will make it work and look just like the Mirage theme. Now to make any
changes, simply copy the relevant template from any .xsl file, put it it
into YourTheme.xsl and modify it as you need. The advantage is that during
next upgrade, any changes to the Mirage theme will reflect automatically in
YourTheme except changes to the templates you customized. Thus it will be
much less work to update to the next version of DSpace.

I don't have this recommended approach on a wiki page, but if you search
the wiki for "theme", you will find plenty other tutorials.


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Dspace-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-general

Reply via email to