EPrints Technical Mailing List Archive

Message: #07102

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

Re: [EP-tech] Link from Abstract/Summary creator to /views/creators/{creator encoded}.html

Hi Brian,

We also have a similar thing, e.g. http://oro.open.ac.uk/35731/ (currently v3.3.15 plus local customisations)

It is a custom local_author_render function defined in cfg.d/eprints_render.pl which checks each author entry for a value in author_id (as per Matthew’s system) and, if that exists, uses it to render the name as a link to the author view based on that id, otherwise just renders the author name.

It is defined as a render_value in eprint_fields.pl 


$c->{fields}->{eprint} = [



            'name' => 'creators',

            'type' => 'compound',

            'multiple' => 1,

            'fields' => [


                            'sub_name' => 'name',

                            'type' => 'name',

                            'hide_honourific' => 1,

                            'hide_lineage' => 1,

                            'family_first' => 1,

                            'render_value' => \&local_author_render,




                            'sub_name' => 'id',

                            'type' => 'authorid',

                            'input_cols' => 20,

                            'allow_null' => 1,




NOTE: It will probably have knock on effects in how the author name is rendered elsewhere though – like in exports and coversheet renderers!





From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Matthew Kerwin
Sent: 26 January 2018 01:17
To: eprints-tech@ecs.soton.ac.uk
Subject: Re: [EP-tech] Link from Abstract/Summary creator to /views/creators/{creator encoded}.html




On 26 Jan. 2018 03:50, "Brian D. Gregg" <bdgregg@pitt.edu> wrote:



Has anyone looked into linking creators from an Abstract/Summary page to the /views/creators/{creator encoded}.html page?  If so, can you explain how you did so?  We have a request to provide that link and I've not come up with what I feel is a good solution yet so I'm asking the group here.


I suspect that this would be a custom render function to alter the displayed list of the creators.  But in addition, is there an existing function that takes the creators name and translates it to the /views/creators/{creator encoded}.html value that we can just use just to create the link?





We have those sorts of links in the citation (eg. https://eprints.qut.edu.au/115171/ )


It's a public holiday here today so I'll have to get back to you on exactly how it's set up, but from memory it's a custom renderer inside the eprint_creators field. I can't remember for sure how it's invoked from the citation.


Since the 'creators' view is not vanilla, it's necessarily one you built yourself, so no one else can tell you how the mapping from creator to encoded view key works. In our case eprint_creators has an 'id' subfield, alongside name and all that.




Matthew Kerwin 

-- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). The Open University is authorised and regulated by the Financial Conduct Authority in relation to its secondary activity of credit broking.