Old Release

This documentation relates to an old version of DSpace, version 5.x. Looking for another version? See all documentation.

Support for DSpace 5 ended on January 1, 2023.  See Support for DSpace 5 and 6 is ending in 2023

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Configuration options

Mirage 2 adds two configuration options to dspace.cfg that affect the rendering of bitstream labels on item pages:

As an administrator, you can choose between displaying the file name (title) or the description (label). Because bitstream description is an optional value, you can also define a fallback value. The default configuration will use the label as the first choice, and fall back to the title field.

### Settings for the Item page in Mirage2 theme ###
# Whether the title or the label of a file should be used to display it on the item page
mirage2.item-view.bitstream.href.label.1 = label

# Whether the title or the label of a file should be used as a fallback to display it on the item page
mirage2.item-view.bitstream.href.label.2 = title

Customizing Mirage 2 

Do not attempt the following

Do not attempt to manage local customizations to Mirage 2 in:

  • src/dspace/modules/xmlui/src/main/webapp/themes
    • This is where you would put standard XMLUI Themes or customizations. However, because of the Mirage 2 build process, this won't work.
  • src/dspace-xmlui-mirage2
    • This is the place where the community, committers and contributors manage the STANDARD version of Mirage 2. You could change files there if your intention is to create a contribution that would benefit everyone. But in this case, we are not talking about a local customization.

Recommended approach

Manage your local Mirage 2 customizations or derived themes in:

src/dspace/modules/xmlui-mirage2

Managing your local customizations in this folder comes with the advantage that you ONLY need to keep files you have changed, compared to the standard Mirage 2 folder. To get you started, the contributors have added a _styles.scss file where you can make local scss customizations:

https://github.com/DSpace/DSpace/tree/master/dspace/modules/xmlui-mirage2/src/main/webapp/themes/Mirage2/styles

Automatically retrieving the latest versions of Mirage 2 dependencies

Mirage 2 dependencies are automatically pulled in during the Bower step of the build process. For official DSpace releases, the committers lock the dependencies on a specific version in order to make the behaviour of the theme predictable.

For development purposes however, it is recommended that set the dependencies to "latest" so you can benefit from the most recent updates and bugfixes in Mirage 2's dependencies. 

You can make these changes in the bower.json file: bower.json

As mentioned in the previous section, make sure you manage this file and any changes you make to it in /dspace/modules e.g. dspace/modules/xmlui-mirage2/src/main/webapp/themes/Mirage2. It is not recommended to update the officially distributed bower.json file directly in /dspace-xmlui-mirage2

Additional Developer documentation

Specific guidelines and technical details about Mirage 2 are part of the Readme.MD file in the Mirage 2 sourcetree.

  • No labels