[EP-tech] Easier way to do this in a citation?
a.p.collington at sussex.ac.uk
Fri Mar 3 13:49:25 GMT 2017
I've recently had to add a few new rules in a citation for a conference proceeding. At the moment I have a number of checks that look something like this:
<if test="is_set(event_title)">, </if>
<if test="is_set(event_dates)">, <print expr="event_dates"/></if>
<if test="is_set(event_title) or is_set(event_location) or is_set(event_dates)">.</if>
So it'll only add a comma before the location if the title is supplied, etc. and the full-stop at the end if any event details are shown. But, well, as you can see it's a pretty messy way to do things and wondered if there were something a little more streamlined available that would allow you to supply a list of fields and it'll then automatically put commas between values if the values are there and a full-stop at the end if needs be? I'm only trying to do this with cite tags in citations/eprints/default.xml.
I did see a 'pretty_list' function in Compiled.pm that looks like it may do something like what I want, but despite trying I didn't see how I could pull this into a citation nor could I find any documentation on the subject. Is that possible?
If this kind of functionality doesn't already exist, then what's the best course of action to adding new types of actions to cite tags? Is it possible to create my own class do add extra actions, or should I update existing modules? (which seems like a bad idea if ever wanting to upgrade). Is there any documentation about doing this kind of thing?
Many thanks for any advice,
Web Programmer, ITS Client Services
ITS-CS Shawcross, University of Sussex, Falmer, Brighton, BN1 9QT
T: (01273) 872591 (ext. 2591)
E: a.p.collington at sussex.ac.uk<mailto:a.p.collington at sussex.ac.uk>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Eprints-tech