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: "Roman Chyla" <roman.chyla AT gmail.com>
Date: Mon, 1 Dec 2008 16:39:28 +0100


Threading: [EP-tech] Tip to make maintaining the eprint_render page easier. from cjg AT ecs.soton.ac.uk
      • This Message

http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
Hi,
the value should be a dom object, like this (yet I may miss the reason
why you need to send an array - if it has more values, only the first
was used)

  my  AT links;
  my $l = $session->make_element("a", href => 
"http://www.gogole.com");
  $l->appendChild( $session->make_text("text search"));
  push( AT links, $l);
  #push( AT links, $l);
  $table->appendChild( $session->render_row(
    $session->make_text( "link" ),
     AT links ) );

On Sat, Nov 29, 2008 at 10:14 PM, Andrea Merkle <Andrea.Merkle AT 
unibas.ch> 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
>>>
>>>
>>>
>>
>>
>>
>
>
>



-- 
--
Mgr. Roman Chyla, Digital publishing administrator
Library of the Academy of Sciences
Narodni 3, 115 21 Praha 1, Czech Republic
+420 731 784 906
roman.chyla AT gmail.com, chyla AT knav.cz
http://www.knav.cz

PhD. student, Charles university
http://uisk.ff.cuni.cz | http://www.roman-chyla.net



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