On Sat, Feb 12, 2011 at 01:27, Glenn Little <[email protected]> wrote:
> But I'm already confused out of the gate.  They both seem in agreement
> that I create/edit my new theme under the [dspace-src] dir, and then
> deploy to the install dir.  Is that the correct "best practice".

The answer is the same as for dspace.cfg which you just discussed in a
parallel thread. There are many ways and you should find a workflow
that suits you the best. There are no .java files in the theme
directory, so you don't necessarily need to run mvn/ant. You can just
edit it under the [dspace] directory, thn restart tomcat and see the
changes. This is the workflow I recommend, because you'll be making
many small tweaks and you don't want to wait through the whole mvn/ant
cycle just to see the result. But when you're done, don't forget to
copy your theme directory from [dspace] to [dspace-src], so that when
you run ant next time, your theme won't be overwritten by an older
version.

> They say to start by making a copy of the "template" theme found here:
>
>  + 
> [dspace-source]/dspace-xmlui/dspace-xmlui-webbapp/src/main/webbapp/themes/template
>
> Which does not exist.  I *do* however have template theme dirs in:
>
>  + 
> [dspace-src]/dspace/target/dspace-1.7.0-build.dir/webapps/xmlui/themes/template
>  + 
> [dspace-src]/dspace/modules/xmlui/target/war/work/org.dspace/dspace-xmlui-webapp/themes/template
>  + [dspace-src]/dspace/modules/xmlui/target/xmlui-1.7.0/themes/template
>
> Which is the "correct" location?  (I'm actually going to start with
> the Reference theme, but I assume the correct parent location to copy
> that one from is the same.)

Yes, the Reference theme is the one you want. Or you could make a copy
of the Mirage theme (new in 1.7.0) which is IMHO better organized and
easier to customize.

Nevermind anything under the "target" directory. This is created from
source automatically by maven.

> Also not clear where to actually put my copy and start working on it.
> Do I make it a sibling to the others?  On the other hand, the doc
> specifically mentions:
>
>  + [dspace-src]/dspace/modules/xmlui/src/main/webapp/themes/[my new theme dir]

That's correct.

> But there is currently no theme dir in webapp there at all.  The thing
> that makes me wonder is that according to the docs, they have you
> copying the template to a new theme dir that sits right next to the
> other themes.  In this case I'd be copying it to a whole new
> apparently previously unused place.

That's because the "modules" directory is a separate place which can
mirror the main source tree hierarchy and any files under modules will
"overlay" the source files. So this is a good place to store the
source files of your local customizations without any fear of losing
them when you update to a new version of DSpace.

These documents give more details on modules (overlays):
https://wiki.duraspace.org/display/DSPACE/Modules
http://www.slideshare.net/tdonohue/making-dspace-15-your-own-customizations-via-overlays


So, to recap, I recommend you to do it this way:
1) Develop your theme under [dspace]/webapps/xmlui/themes/YOURTHEME.
Restart Tomcat to see changes.
2) Change the active theme in [dspace]/config/xmlui.xconf. Also copy
this file to [dspace-src]/dspace/config/xmlui.xconf so that it will
work the next time you build DSpace.
3) When you're done developing, copy your theme to
[dspace-src]/dspace/modules/xmlui/src/main/webapp/themes so that it
will work the next time you build DSpace.

Regards,
~~helix84

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to