SUNScholar/XMLUI Theme/Tutorial
Back to XMLUI Theme
Contents
Overview
Theme Expression Sequence
First a Java file per aspect is created to form the DRI in an XML format.
/home/dspace/source/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect
The XML is transformed via XSL to XHTML, using global transformers.
/home/dspace/source/dspace-xmlui/src/main/webapp/themes/dri2xhtml /home/dspace/source/dspace-xmlui/src/main/webapp/themes/dri2xhtml-alt
The XML is further transformed via XSL to XHTML, using localised transformers.
/home/dspace/source/dspace-xmlui/src/main/webapp/themes/Mirage/sitemap.xmap /home/dspace/source/dspace-xmlui/src/main/webapp/themes/Mirage/Mirage.xsl
Official Help
View the following for official DSpace Manakin help.
- https://wiki.duraspace.org/display/DSPACE/Manakin+theme+tutorial
- https://wiki.duraspace.org/label/DSPACE/manakinhowto
View the following for a better understanding of XMLUI Mirage theme design using the "modules" overlay method:
Development Tools
Theme path
A new feature in DSpace 1.5 is the ability to try out different themes on a particular page without having to mess with the xmlui.xconf file or needing to restart Tomcat. Two things need to be done in order to apply a theme to any page you are currently looking at.
- The following setting in dspace.cfg must be set to true: xmlui.theme.allowoverrides=true
- The "themepath" value should be appended to the end of the url. See examples below.
http://scholar.sun.ac.za/?themepath=Classic/ http://scholar.sun.ac.za/?themepath=Reference/ http://scholar.sun.ac.za/?themepath=Mirage/ http://scholar.sun.ac.za/?themepath=Kubrick/ http://scholar.sun.ac.za/?themepath=mobile/
Now check all themes rendering the discovery search page.
http://scholar.sun.ac.za/discover?themepath=Classic/ http://scholar.sun.ac.za/discover?themepath=Reference/ http://scholar.sun.ac.za/discover?themepath=Mirage/ http://scholar.sun.ac.za/discover?themepath=Kubrick/ http://scholar.sun.ac.za/discover?themepath=mobile/
DRI Expression
You can view the DRI (DSpace Repository Interface) elements as follows per page by prepending DRI/.
http://scholar.sun.ac.za/DRI/discover http://scholar.sun.ac.za/DRI/statistics-home
XML Expression
You can view the XML elements as follows per page by appending ?XML.
http://scholar.sun.ac.za/discover?XML http://scholar.sun.ac.za/statistics-home?XML
Combined Expression
Now lets combine expressions as follows.
http://scholar.sun.ac.za/DRI/?themepath=Classic/ http://scholar.sun.ac.za/DRI/discover?themepath=Classic/ http://scholar.sun.ac.za/DRI/statistics-home?themepath=Classic/
Getting at the raw XHTML
Moving further down the pipeline, once the XSL templates have been applied and DRI has been converted into XHTML, CSS rules can be applied to the result in order to impart a specific look and feel to the theme. This is the point where Tier 1 development usually begins. When editing the CSS, Manakin theme development is much like any Web development project. You start out with XHTML, a blank CSS and possibly a design in mind, and work with the CSS until the results are satisfactory.
Getting at the raw XHTML output of the XSL processor is easy: all browsers allow the user to look at the page source and save a copy. While the underlying HTML varies for any given DSpace page, the top-level structures like body and header remain consistent. One technique is to go through DSpace page by page, look at the HTML, and create CSS rules as necessary. Alternatively, you can extend the Reference theme that contains CSS selectors for nearly all elements encountered in the HTML structures of Manakin DSpace.
Theme Repository
Check out the following theme repositories.
- http://web.lib.sun.ac.za/style/sunscholar/theme :- DS32 = DSpace 3.2, DS182 = DSpace 1.8.2, DS172 = DSpace 1.7.2
- https://wiki.duraspace.org/display/DSPACE/Repository+of+XMLUI+themes
References
- http://www.slideshare.net/bramluyten/dspace-3-xml
- https://wiki.duraspace.org/display/DSPACE/Manakin+theme+tutorial
- https://wiki.duraspace.org/display/DSPACE/XMLUI+How+To+Guides
- https://wiki.duraspace.org/display/DSPACE/TechnicalFaq#TechnicalFaq-HowdoIremovethesearchboxfromthefrontpageinXMLUI
- https://wiki.duraspace.org/pages/viewpage.action?pageId=19006388
- https://wiki.duraspace.org/pages/viewpage.action?pageId=19006130
- http://design.ubuntu.com/assets/colour-palette
- http://design.ubuntu.com/assets/ubuntu-font-family
