EPrints Technical Mailing List Archive

Message: #00804


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

[EP-tech] Re: views_render to manipulate a views index


Am 27.06.2012 12:34, schrieb Stephen Shorrock:
Dear list,

I've created a view on the authors_id|editors_id but when displaying I
would like to replace the ids (username) of the users with their
associated account names as stored in the users table.  These account
names have to be looked up as they are not saved as part of the
publication (when the publication is rendered the UNDEFINED is hidden),
as the user does exist in the publication but may have a slightly
different name as published by the journal and these names are saved
without usernames.

My question is:  Is there a way via the configuration options of EPrints
to implement such a lookup & replacement (creators_id / username =>
account name) for the purpose of views, I was looking at some of the
views_render examples as provided with the application could the
replacement be done via one of these.  There is no documentation about
views_render on the EPrints website.


Hi Stephen,

The as_item function should do, but I do not know the composite field name of name_family, name_given etc. if it exists: $item{userid}.as_item(){wanted_field} Another option is $item{userid}.as_item().citation('brief'), but it will print also the email address as is default.

Regards,
F Heß

Thanks in advance

Stephen
*** 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/



--
UB Heidelberg (Altstadt)
Plöck 107-109, 69117 HD
- Informationstechnik
- WWW-Redaktion
Tel. 06221 / 54 3550
http://www.ub.uni-heidelberg.de/