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: Tim Brody <tdb01r AT ecs.soton.ac.uk>
Date: Mon, 01 Dec 2008 15:48:30 +0000


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/
Roman Chyla wrote:
> 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 ) );
>   
You could write this:

my $link = $session->render_link( "http://www.google.com/" );
$link->appendChild( $session->make_text("text search"));
$table->appendChild( $session->render_row(
    $session->make_text( "link" ),
    $link ) );

Perl arguments aren't strongly typed and are always an array (list 
actually), regardless of whether you pass an array ( AT array) or list 
($one, $two, three).

All the best,
Tim.


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