EPrints Technical Mailing List Archive
Message: #05797
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] epc and citation templates
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: Re: [EP-tech] epc and citation templates
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Tue, 28 Jun 2016 11:22:01 +0000
Hi Matt, How do you get your list of related EPrintIDs? Are they stored in a field, or calculated dynamically? Lizz’s suggestion is good. If you *really* want to constrain yourself to use logic in the citation files, you will need to inject some extra methods into the EPrints::Script::Compiled module *unless* your EPrintIDs are stored
in an ‘Itemref’ field. If they’re in an Itemref field, you can use the ‘as_item’ method. If they’re not, you can add something like (pseudo code!) package EPrints::Script::Compiled sub run_datasetid_and_id_to_dataobj { my( $self, $state, $datasetid, $id) = @_; # turn $datasetid and $id into a dataobj # return [ $dataobj ]; } And then use <epc:print expr=”datasetid_and_id_to_dataobj( ‘eprint’, $eprintid ).citation(‘default’)” /> An example of this technique at the end of this file:
http://bazaar.eprints.org/207/1/epm/containers/cfg/cfg.d/z_containers.pl Cheers, John From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of Lizz Jennings You can write a render method in eprint_render.pl (or wherever you have that configuration as it can be overridden). I’ve used this as I have created a parent-child functionality, but you could obviously adapt this to what you were wanting to include. https://gist.github.com/icklecows/da6b254563bed40f8bb2047756e91043 (and sorry for all the embedded styles in there, it’s a temporary measure…) You write the code to a fragment, and can then include the fragment in the summary_page.xml file. Lizz -- Lizz Jennings BA MSc ACLIP MCLIP (Revalidated 2015) Technical Data Officer The Library 4.10, University of Bath, Bath, BA2 7AY UK Ext. 3570 (External 01225 383570) Research Data Management:
http://www.bath.ac.uk/research/data From:
eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of Matthew Brady Hi All, I am experimenting with the summary_page xml file and I am wondering if there is a way to call or embed the citations for other ePrint items, to end up with a
sort of ‘other papers’ type section… I know the ePrintID’s for the items I am interested in, but I can’t see anything in the wiki about how to call a citation for a specific item, aside from the standard
method, where $item is the current object. <epc:print expr="$item.citation('default')" /> Any ideas would be appreciated… Cheers Matt
_____________________________________________________________
This email (including any attached files) is confidential and is for the intended recipient(s) only. If you received this email by mistake, please, as a courtesy, tell the sender, then delete this email.
The views and opinions are the originator's and do not necessarily reflect those of the University of Southern Queensland. Although all reasonable precautions were taken to ensure that this email contained no viruses at the time it was sent we accept no liability for any losses arising from its receipt.
The University of Southern Queensland is a registered provider of education with the Australian Government.
(CRICOS Institution Code QLD 00244B / NSW 02225M, TEQSA PRV12081 )
|
- References:
- [EP-tech] epc and citation templates
- From: Matthew Brady <Matthew.Brady@usq.edu.au>
- Re: [EP-tech] epc and citation templates
- From: Lizz Jennings <E.Jennings@bath.ac.uk>
- [EP-tech] epc and citation templates
- Prev by Date: Re: [EP-tech] epc and citation templates
- Next by Date: Re: [EP-tech] epc and citation templates
- Previous by thread: Re: [EP-tech] epc and citation templates
- Next by thread: Re: [EP-tech] epc and citation templates
- Index(es):