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

Sebastien Francois sf2 at ecs.soton.ac.uk
Fri Apr 27 14:02:27 BST 2012


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 at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Sebastien Francois
> Sent: 26 April 2012 14:13
> To: eprints-tech at 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.



More information about the Eprints-tech mailing list