It turned out to be quit a simple change. Add an additional field to the
org.dspace.app.xmlui.configuration.Theme object to hold the metadata field
and value to match,
modify org.dspace.app.xmlui.configuration.XMLUIConfiguration to include the
new Theme object field in its work, and
modify
Ok Guys I'm gonna try the following and comments are welcome.
1) I'm gonna add code in org.dspace.app.xmlui.configuration.Theme that
stores an additional tag (similar to handle=) called 'metadata' with
appropriate methods hasMetadata() etc.
2) In ThemeMatcher I add an additional section testing
John,
Seems sensible, what would be ideal is if we could arrive at some sort of
language for the field that would allow for matching on other criteria.
Some days I wonder why this isn't just in the cocoon sitemap, xmlui.xconf
is very limiting and unwieldy. Alternatively, making the matcher into
Another route to go would be to use a single theme, and then have XSL logic
that changes the behavior of item-view, depending on that metadata value.
In my theme I've been changing the display behavior depending on the
mimetype of the bitstreams (audio, video, document), as well as metadata
I've done this in the past it's just that it tends to get messy the more
you add and I'm looking for a cleaner solution.
John
On Mon, Apr 13, 2015, 3:34 PM Peter Dietz pe...@longsight.com wrote:
Another route to go would be to use a single theme, and then have XSL
logic that changes the
So if I add some rule patterns to the xmlui.xconf (regex=? section) that
dont break the existing ones, and add code to ThemeMatcher (lines 105 to
120+) that use the uri to instantiate the dspace object and find some
metadata and match to the rule pattern (similar to the checking handles
code) then
Hi All, Can anyone say if it is possible within DSpace 5.x codebase to
install a different xmlui theme based on a dc.type similar to what is done
to install a theme per collection or community, or if not then how easy it
would be for me to add a hack or code to implement such a beast.
John
John,
You could add a theme match on Item handle. We have overridden ThemeMatcher
in other projects and extended it with additional support for features such
as requested domain name. I can see it feasible to extend it to support
checking for specific metadata fields in the 5.x DSpaceObject