EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #01584
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: {Disarmed} summary page with link
- To: eprints-tech@ecs.soton.ac.uk
- Subject: [EP-tech] Re: {Disarmed} summary page with link
- From: Tim Brody <tdb2@ecs.soton.ac.uk>
- Date: Mon, 18 Feb 2013 09:18:19 +0000
On Fri, 2013-02-15 at 13:33 +0100, Marc Marc wrote: > Hi all, > > > In my EPrints database I have a field 'catalogue_id' (e.g. ID00021) > and I would like to create a link on the summary page: > <a href="http://mycatalogue.com/search?ID00021">Catalogue link</a> > > In EPrints 3.0.5 I used the following code > (/cfg/cfg.d/eprint_render.pl): > > my $catalogue_link = $session->make_element( "div", > class=>"ep_block", > style=>"margin-bottom: 1em" ); > my $cataloguelink = "MailScanner has detected a possible fraud > attempt from "3c.gmx.net" claiming to be > http://mycatalogue.com/search?" . > $eprint->get_value( "catalogue_id" ); > $catalogue_link->appendChild( $session->html_phrase( > "page:catalogue_link", > url => $session->make_text( $cataloguelink ), > link => > $session->render_link( $cataloguelink ) ) ); > $page->appendChild( $catalogue_link ); > > How can I do this in EPrints 3.3.x? > The summary page will be created via: > /cfg/cfg.d/eprint_render.pl > /cfg/citation/eprint/summary_page.xml Hi, What I would do is add a custom render method to your field definition then in summary you can simply do: <epc:print expr="catalogue_id" /> See: http://wiki.eprints.org/w/API:EPrints/MetaField#Rendering i.e. { name => "foo", type => "id", render_value => \&render_catalogue_id, }; sub render_catalogue_id { my ($repo, $field, $value) = @_; ... render code } -- All the best, Tim
Attachment:
signature.asc
Description: This is a digitally signed message part
- References:
- [EP-tech] {Disarmed} summary page with link
- From: "Marc Marc" <marc_3278@gmx.de>
- [EP-tech] {Disarmed} summary page with link
- Prev by Date: [EP-tech] Re: RFC access log table
- Next by Date: [EP-tech] linking an eprint to parent-divisions
- Previous by thread: [EP-tech] {Disarmed} summary page with link
- Next by thread: [EP-tech] linking an eprint to parent-divisions
- Index(es):