EPrints Technical Mailing List Archive
Message: #06324
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Easier way to do this in a citation?
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Easier way to do this in a citation?
- From: Andrew Collington <a.p.collington@sussex.ac.uk>
- Date: Fri, 3 Mar 2017 13:49:25 +0000
Hi all, 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)"> <print expr="event_title"/> </if> <if test="event_location"> <if test="is_set(event_title)">, </if> <print expr="event_location"/> </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, Andy -- |
- Prev by Date: Re: [EP-tech] What's the ideal method for importing records
- Next by Date: Re: [EP-tech] Easier way to do this in a citation?
- Previous by thread: [EP-tech] What's the ideal method for importing records
- Next by thread: Re: [EP-tech] Easier way to do this in a citation?
- Index(es):