EPrints Technical Mailing List Archive

Message: #04931


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: citation modification


Hi,

At http://wiki.eprints.org/w/API:EPrints/MetaField#Rendering,
the parameters order seems to be different than yours:
$repo first, then $field...

Le 13 octobre 2015 18:03:46 CEST, Thomas Lauke <th.lauke@arcor.de> a écrit :
Hi Adam,

Ah, it's a compound multiple field.
as usual ;)

You need to render creators_name, not creators.
Also, try putting the render_single_value in the name subfield definition
Let us know if it works.
After integration of your above mentioned modifications, I got the following output:
family:Foote
given:H.W.
That's it:Foote+ H.W.
Can't locate object method "xml" via package "EPrints::MetaField::Name" at (eval 63) line 13.
... thus the code stops at the first creator.

The rendering routine looks like
$c->{render_name_with_initials} = sub
{
my( $field, $repo, $value ) = @_;
my $family = $value->{family};
my $given = $value->{given};
print STDERR "family:", $family, "\n";
print STDERR "given:", $given, "\n";
my $name = $family . '+ ' . $given;
print STDERR "That's it:", $name, "\n";
return $repo->xml->create_text_node( $name );
}

Which object method should be used instead?

Regards
Thomas
*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/

--
Envoyé de mon téléphone Android avec K-9 Mail. Excusez la brièveté.