EPrints Technical Mailing List Archive
Message: #01466
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: migrating customised code when upgrading 3.1.0 -> 3.3.10
- To: eprints-tech@ecs.soton.ac.uk
- Subject: [EP-tech] Re: migrating customised code when upgrading 3.1.0 -> 3.3.10
- From: Tim Brody <tdb2@ecs.soton.ac.uk>
- Date: Tue, 22 Jan 2013 10:10:01 +0000
On Tue, 2013-01-22 at 13:05 +1100, Matthew Brady wrote: > In previous versions (3.1.x), there used to be a line in the > file /opt/eprints3/archives/<repoid>/cfg/cfg.d/eprint_render.pl > > > > my @documents = $eprint->get_all_documents(); > > > > Which could be replaced to allow supporting documents etc., related to > the eprint item, to be stored but not made visible on abstract pages > etc.. > > my @documents = (); > foreach my $doc ( $eprint->get_all_documents() ) > { > next if $doc->get_value( "security" ) eq "nonvisible"; > push @documents, $doc; > } > > > > Does anyone know of a way to do this in 3.3.10? Hi, get_all_documents() has never changed but rendering has been moved into the XML, which allows you to customise the abstract page without having to hack in Perl. NB that doesn't mean you have to use XML, you can still do your rendering in Perl and pass it as a fragment to the XML. So from this (in citations/eprint/summary_page.xml): <epc:foreach expr="$docs" iterator="doc"> <epc:print expr="$doc.citation('eprint_page', 'eprint', $item)" /> </epc:foreach> To this: <epc:foreach expr="$docs" iterator="doc"> <epc:if test="$doc.security != 'nonvisible'"> <epc:print expr="$doc.citation('eprint_page', 'eprint', $item)" /> </epc:if> </epc:foreach> ? -- All the best, Tim
Attachment:
signature.asc
Description: This is a digitally signed message part
- References:
- [EP-tech] migrating customised code when upgrading 3.1.0 -> 3.3.10
- From: Matthew Brady <Matthew.Brady@usq.edu.au>
- [EP-tech] migrating customised code when upgrading 3.1.0 -> 3.3.10
- Prev by Date: [EP-tech] Re: EPrints REST API documentation
- Next by Date: [EP-tech] Eprints 3.1 to 3.3 upgrade not working
- Previous by thread: [EP-tech] migrating customised code when upgrading 3.1.0 -> 3.3.10
- Next by thread: [EP-tech] Re: migrating customised code when upgrading 3.1.0 -> 3.3.10
- Index(es):