Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

DSpace

...

System

...

Documentation:

...

Manakin

...

[XMLUI

...

]

...

Configuration

...

and

...

Customization

The DSpace digital repository supports two user interfaces: one based on JavaServer Pages (JSP) technologies and one based upon the Apache Cocoon framework (XMLUI). This chapter describes those parameters which are specific to the Manakin (XMLUI) interface based upon the Cocoon framework.

...

The Manakin user interface is composed of two distinct components: aspects and themes. Manakin aspects are like extensions or plugins for Manakin; they are interactive components that modify existing features or provide new features for the digital repository. Manakin themes stylize the look-and-feel of the repository, community, or collection.unmigrated-wiki-markup

The repository administrator is able to define which aspects and themes are installed for the particular repository by editing the _\[dspace\]/config/xmlui.xconf_ configuration file. The _xmlui.xconf_ file consists of two major sections: Aspects and Themes.

Aspects

The <aspects> section defines the "Aspect Chain", or the linear set of aspects that are installed in the repository. For each aspect that is installed in the repository, the aspect makes available new features to the interface. For example, if the "submission" aspect were to be commented out or removed from the xmlui.xconf, then users would not be able to submit new items into the repository (even the links and language prompting users to submit items are removed). Each <aspect> element has two attributes, name and path. The name is used to identify the Aspect, while the path determines the directory where the aspect's code is located. Here is the default aspect configuration:

...

The interface will automatically determine which file to select based upon the user's browser and system configuration. For example, if the user's browser is set to Australian English then first the system will check if messages_en_au.xml is available. If this translation is not available it will fall back to messages_en.xml, and finally if that is not available, messages.xml.unmigrated-wiki-markup

Manakin supplies an English only translation of the interface. In order to add other translations to the system, locate the _\[dspace-source\]/dspace/modules/xmlui/src/main/webapp/i18n/_ directory. By default this directory will be empty; to add additional translations add alternative versions of the _messages.xml_ file in specific language and country variants as needed for your installation.

To set a language other than English as the default language for the repository's interface, simply name the translation catalogue for the new default language "messages.xml"

Creating a New Theme

Wiki MarkupManakin themes stylize the look-and-feel of the repository, community, or collection and are distributed as self-contained packages. A Manakin/DSpace installation may have multiple themes installed and available to be used in different parts of the repository. The central component of a theme is the sitemap.xmap, which defines what resources are available to the theme such as XSL stylesheets, CSS stylesheets, images, or multimedia files. *
1) Create theme skeleton*
Most theme developers do not create a new theme from scratch; instead they start from the standard theme template, which defines a skeleton structure for a theme. The template is located at: _\[dspace-source\]/dspace-xmlui/dspace-xmlui-webbapp/src/main/webbapp/themes/template_. To start your new theme simply copy the theme template into your locally defined modules directory, _\[dspace-source\]/dspace/modules/xmlui/src/main/webbapp/themes/\[your theme's directory\]/_. *
2) Modify theme variables*
The next step is to modify the theme's parameters so that the theme knows where it is located. Open the _\[your theme's directory\]/sitemap.xmap_ and look for _<global-variables>_

Code Block
    <global-variables>
        <theme-path>[your theme's 	directory]</theme-path>
        <theme-name>[your theme's name]</theme-name>
    </global-variables>

Update both the theme's path to the directory name you created in step one. The theme's name is used only for documentation.
3) Add your CSS stylesheets
The base theme template will produce a repository interface without any style - just plain XHTML with no color or formatting. To make your theme useful you will need to supply a CSS Stylesheet that creates your desired look-and-feel. Add your new CSS stylesheets:

Wiki Markup_\[your theme's directory\]/lib/style.css_ (The base style sheet used for all browsers)

Wiki Markup_\[your theme's directory\]/lib/style-ie.css_ (Specific stylesheet used for internet explorer) *
4) Install theme and rebuild DSpace*
Next rebuild and deploy DSpace (replace <version> with the your current release):

...

  1. Rebuild the DSpace installation package by running the following command from your _\[dspace-source\]/dspace/_ directory: unmigrated-wiki-markup
    Code Block
    mvn package
  2. Update all DSpace webapps to _\[dspace\]/webapps_ by running the following command from your _\[dspace-source\]/dspace/target/dspace-\[version\]-build.dir_ directory:
    Code Block
    ant -Dconfig=[dspace]/config/dspace.cfg update 
  3. Deploy the the new webapps:
    Code Block
    cp -R /[dspace]/webapps/* /[tomcat]/webapps
  4. Restart Tomcat
    This will ensure the theme has been installed as described in the previous section "Configuring Themes and Aspects".

...

The XMLUI "news" document is only shown on the root page of your repository. It was intended to provide the title and introductory message, but you may use it for anything.unmigrated-wiki-markup.

The news document is located at _\[dspace\]/dspace/config/news-xmlui.xml_. There is only one version; it is localized by inserting "i18n" callouts into the text areas. It must be a complete and valid XML DRI document (see Chapter 15).

Its (the News document) exact rendering in the XHTML UI depends, of course, on the theme. The default content is designed to operate with the reference themes, so when you modify it, be sure to preserve the tag structure and e.g. the exact attributes of the first DIV tag. Also note that the text is DRI, not HTML, so you must use only DRI tags, such as the XREF tag to construct a link.

...

The XMLUI user interface supports the addition of globally static content (as well as static content within individual themes).

Wiki MarkupGlobally static content can be placed in the _\[dspace-source\]/dspace/modules/xmlui/src/main/webapp/static/_ directory. By default this directory only contains the default _robots.txt_ file, which provides helpful site information to web spiders/crawlers. However, you may also add static HTML (_\*.html_) content to this directory, as needed for your installation.

Wiki MarkupAny static HTML content you add to this directory may also reference static content (e.g. CSS, Javascript, Images, etc.) from the same _\[dspace-source\]/dspace/modules/xmlui/src/main/webapp/static/_ directory. You may reference other static content from your static HTML files similar to the following:

Code Block
  <link href="./static/mystyle.css" rel="stylesheet" type="text/css"/>
  <img src="./static/images/static-image.gif" alt="Static image in /static/images/ directory"/>
  <img src="./static/static-image.jpg" alt="Static image in /static/ directory"/> 

...