EPrints Technical Mailing List Archive

Message: #00451


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

[EP-tech] Re: How to make related URLs appear as text links and not bare URLs?


Yes Alex, if you want to create your own rendering method, do something like:

'name' => 'related_url',
...
'render_value' => 'alex_render_related_url',
...etc...

Then at the end of that file, or better, in its own .pl file:

sub alex_render_related_url
{
# copy content from EPrints::Extras::render_related_url and tweak it accordingly.
}

Seb

On 27/04/12 11:40, Alex Birchall wrote:
Thanks, Seb.

In eprint_fields.pl, there is this stanza:

{
             'name' =>  'related_url',
             'type' =>  'compound',
             'multiple' =>  1,
             'render_value' =>  'EPrints::Extras::render_related_url',
             'fields' =>  [
                           {
                             'sub_name' =>  'url',
                             'type' =>  'url',
                             'input_cols' =>  40,
                           },
                           {
                             'sub_name' =>  'type',
                             'type' =>  'set',
                             'options' =>  [
                                            'pub',
                                            'author',
                                            'org',
                                          ],
                           }
                         ],
             'input_boxes' =>  1,
             'input_ordered' =>  0,
           },

Is the above what I need to tweak?

Regards,

Alex
-----Original Message-----
From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Sebastien Francois
Sent: 26 April 2012 14:13
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] Re: How to make related URLs appear as text links and not bare URLs?

While somewhat outdated, this still applies:
http://wiki.eprints.org/w/Metadata#Rendering_Properties

Also check EPrints::Extras::render_related_url() which seems to do something similar to what you want.

Seb.