EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #04018
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: Contributors data
- To: eprints-tech@ecs.soton.ac.uk
- Subject: [EP-tech] Re: Contributors data
- From: "Field A.N." <af05v@ecs.soton.ac.uk>
- Date: Mon, 2 Mar 2015 15:03:46 +0000
Hi Cristian You should look into writing a custom renderer. In the field definition: render_value => 'render_contributors_with_contribution', ...and then in a separate cfg.d file (appropriately named): $c->{render_contributors_with_contribution} = sub { my ($repo, $field, $value) = @_; my $xml = $repo->xml; my $contributors_str = []; foreach my $contributor (@{$value}) { my $str = EPrints::Utils::make_name_string($contributor->{name}); if ($contributor->{contributor_type}) { my $phrase_name = "contributor_type_" . $value->{contributor_type}; $str .= ' [' . $repo->phrase($phrase_name) . ']'; } push @{$contributors_str}, $str; } return $repo->xml->create_text_node(join('; ',@{$contributors_str}); } Note that I have typed this straight into my email. It will almost certainly not compile, and once it does it may not work. You will probably need to do a little debugging. Alternatively, you could probably do this with an XML citation style using conditionals and iterators... -- Adam Field Business Relationship Manager and Community Lead EPrints Services On 2 Mar 2015, at 13:22, Centro de Documentación wrote: > Hi guys, > > Is it possible to show contributors_name and contributors_type in the > same row in abstract pages? Something like that: > > Contributors: contributors_name [contributors_type]; contributors_name > [contributors_type] ... > > Regards, > > Cristian > *** 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/
- References:
- [EP-tech] Contributors data
- From: Centro de Documentación <cendocu@gmail.com>
- [EP-tech] Contributors data
- Prev by Date: [EP-tech] Contributors data
- Next by Date: [EP-tech] Re: Contributors data
- Previous by thread: [EP-tech] Contributors data
- Next by thread: [EP-tech] Re: Contributors data
- Index(es):