Tech List

[index] [prev] [next] [options] [help]
See the Mailing Lists Page for how to subscribe and unsubscribe.

eprints_tech messages

Please note: this page shows emails that have been sent to the eprints_tech mailing list. Some of these may be spam emails we have failed to filter.

[EP-tech] Re: linking in render_row

From: Rachel Hill <rachel.hill AT dcu.ie>
Date: Mon, 01 Dec 2008 15:18:57 +0000


Threading: [EP-tech] linking in render_row from Andrea.Merkle AT unibas.ch
      • This Message
             [EP-tech] Re: linking in render_row from Andrea.Merkle AT unibas.ch

http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/


Hi Andrea,
Don't know if this is what you're looking for but here is an exerpt of 
code I used to create a use license link in eprint_render.pl

       $uselicenselink = $session->make_element ("a", 
href=>$eprint->{session}->get_archive()->get_conf( 
"base_url" )."/". 
"licenses/". $use_license . "/");
       $uselicenselink-> appendChild( $session->make_text("View 
License"));
       $table->appendChild($session->render_row(
               
$session->html_phrase("eprint_fieldname_use_license"),
               $uselicenselink));

Rachel

Andrea Merkle wrote:
> http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** EPrints community wiki - http://wiki.eprints.org/
>   Hi all,
>
> does anybody know how to invoke a link
> in the method
>
> render_row($key,  AT values)
>
> in the case of $value[0]="http://thisisalink".
> (This is related to the problem below).
>
> Andrea
>
>
> Andrea Merkle schrieb:
>   
>> http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>> *** EPrints community wiki - http://wiki.eprints.org/
>> Thank you Andrea,
>>
>> I apologize for the delay.
>>
>> Now it works.  Yes, except for hyperlinking, where I suppose a 
function 
>> of Session.pm. Tried out $session->render_link($frag) But didn't 
work.
>>
>> Andrea
>>
>>     
>>> http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>>> *** EPrints community wiki - http://wiki.eprints.org/
>>> Hi Andrea,
>>>
>>> I hacked the "my $frag" structure of the type row in the 
 
>>> eprint_render.pl document to do something related to this, but my  

>>> direct example is overly complex so I've tried to simplify it  
>>> according to your example. It's untested and the syntax might not 
be  
>>> quite right for the $table part, but the $frag part should work to 
set  
>>> up the dynamic URL for insertion into the table row. There is 
probably  
>>> a clever way to set up the table row so that it automatically  
>>> hyperlinks the URL, but I'm not sure how it would be done.
>>>
>>> my $frag = $session->make_doc_fragment;
>>> 	$frag->appendChild( $eprint->make_text( "tell the user 
something  
>>> about the link here"  ) );
>>> 		if( $eprint->is_set( "some_no") )
>>> 		{
>>> 		$frag->appendChild( $session->make_text( " 
http://base=" ));
>>> 		$frag->appendChild( $eprint->render_value( 
"some_no" ));
>>> 		}
>>>
>>> $table->appendChild( $session->render_row(
>>> 		$session->$frag ));
>>>
>>> Hope that helps -
>>>
>>> Andrea
>>>
>>> On Nov 17, 2008, at 11:28 AM, Andrea Merkle wrote:
>>>
>>>       
>>>> http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>>>> *** EPrints community wiki - http://wiki.eprints.org/
>>>> Hi,
>>>>
>>>> want to insert dynamic link in the table in eprint_render.pl. 
I  
>>>> think it
>>>> should be something like this, as I want to append the 
rendered  
>>>> value to
>>>> the base link
>>>>
>>>> ....
>>>> $table->appendChild( $session->render_row(
>>>> $session->$anyfunction("tell the user something about 
the link here"),
>>>> $session->$anyfunction("http://base=".- 
>>>>         
>>>>> render_value("some_no") )
>>>>>           
>>>> )  );
>>>> ...
>>>>
>>>> How to do it exactly? Can anybody help here?
>>>>
>>>> Andrea Merkle
>>>> Öffentliche Bibliothek der Universität Basel
>>>>
>>>>         
>>> Andrea Wiggins
>>> PhD Student, School of Information Studies
>>> Syracuse University
>>>
>>> 337 Hinds Hall
>>> Syracuse, NY 13244
>>> awiggins AT syr.edu
>>> www.andreawiggins.com
>>>
>>>
>>>
>>>       
>>     
>
>
>
>   


-- 

Rachel Hill
DORAS Institutional Repository Manager
Dublin City University Library, Dublin 9
Ireland

Tel: +353 1 7008747
DORAS website: http://doras.dcu.ie


-- 

Rachel Hill
DORAS Institutional Repository Manager
Dublin City University Library, Dublin 9
Ireland

Tel: +353 1 7008747
DORAS website: http://doras.dcu.ie


ATTACHMENT: message.html!


[index] [prev] [next] [options] [help]