[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[EP-tech] Re: citation modification
- Subject: [EP-tech] Re: citation modification
- From: th.lauke at arcor.de (Thomas Lauke)
- Date: Tue, 13 Oct 2015 16:09:30 +0200 (CEST)
- References: <1215107038.694055.1444406946783.JavaMail.ngmail@webmail22.arcor-online.net>
Hi Adam,
there's obviously something wrong, although I think to follow all your instructions :(
I modified eprint_fields.pl:
{
name => 'creators',
type => 'compound',
multiple => 1,
fields => [
{
sub_name => 'name',
type => 'name',
hide_honourific => 1,
hide_lineage => 1,
family_first => 1,
},
{
sub_name => 'id',
type => 'text',
input_cols => 20,
allow_null => 1,
}
],
render_single_value => 'render_name_with_initials',
input_boxes => 2,
},
I introduced eprint_render_single.pl:
print STDERR "It's Me :)\n";
$c->{render_name_with_initials} = sub
{
print STDERR "It's You :)\n";
my( $field, $repo, $value ) = @_;
my $family = $value->{family};
my $given = $value->{given};
return $repo->xml->create_text_node( 'foo' );
}
I used Test.pl
#!/usr/bin/perl -I/opt/eprints3/perl_lib
use strict;
use warnings;
use EPrints;
my $ep = EPrints->new;
my $repo = $ep->repository('b40literatur');
my $eprint = $repo->dataset('eprint')->dataobj(3);
print STDERR EPrints::Utils::tree_to_utf8($eprint->render_value('creators'));
But I got finally for perl Test.pl
It's Me :)
CreatorsEmailFoote, H.W.UNSPECIFIEDLevy, L.H.UNSPECIFIED
Thus my extra subroutine is never called even after apache's restart and database update?!
Thanks for any hint
Thomas