EPrints Technical Mailing List Archive
Message: #05713
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] How to customize creators_name in citations
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: Re: [EP-tech] How to customize creators_name in citations
- From: Adam Field <Adam.Field@jisc.ac.uk>
- Date: Mon, 16 May 2016 21:26:10 +0000
The default rendering of names is with EPrints::Utils::make_name_string, which inserts the comma whether you like it or not. See:
You will need a render method:
$c->{render_family_name_first_no_comma} = sub
{
my ($repo, $field, $value, $allangs, $nolink, $eprint) = @_;
#please make this a little more sophisticated -- there's currently no exception handling for missing values
return $repo->xml->create_text_node($value->{family} . ' ' . $value->{given});
}
...and in the field definition:
{ name => 'creators', type => 'compound', multiple => 1, fields => [ { sub_name => 'name', type => 'name', hide_honourific => 1, hide_lineage => 1, family_first => 1, render_single_value => 'render_family_name_first_no_comma',
}, { sub_name => 'id', type => 'text', input_cols => 20, allow_null => 1, } ], input_boxes => 4, }, Adam
On 16 May 2016, at 21:18, Mathieu Perron <mathieu_perron@uqac.ca> wrote:
Hi, Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc’s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800. Jisc Services Limited is a wholly owned Jisc subsidiary and a company limited by guarantee which is registered in England under company number 2881024, VAT number GB 197 0632 86. The registered office is: One Castle Park, Tower Hill, Bristol BS2 0JA. T 0203 697 5800. |
- References:
- [EP-tech] How to customize creators_name in citations
- From: Mathieu Perron <mathieu_perron@uqac.ca>
- [EP-tech] How to customize creators_name in citations
- Prev by Date: [EP-tech] How to customize creators_name in citations
- Next by Date: Re: [EP-tech] Notification of embargo release?
- Previous by thread: [EP-tech] How to customize creators_name in citations
- Next by thread: Re: [EP-tech] How to customize creators_name in citations
- Index(es):