[EP-tech] Rendering multilingual fields

Lourdes Calvo Montero lcalvom at pas.ucm.es
Thu Mar 20 11:31:28 GMT 2014


Hi all,

I have a multilingual field (abstract_other) :

{
	name => 'abstract_other',
	type => 'multilang',
        multiple=>1,
        fields => [{sub_name => 'abstract2', type => 'longtext',
        input_rows=>10 , render_value =>'render_paras'},],
},


In one eprint it has been populated with two instances (english and french),

but when I try to render it with this code:

if( $eprint->is_set( "abstract_other" ) )
         {
                 my $div = $session->make_element( "div", class=>"ep_block" );
                 $page->appendChild( $div );
				 my $h2 = $session->make_element( "h2" );
		$h2->appendChild(
			$session->html_phrase( "eprint_fieldname_abstract_other" ) );
		$div->appendChild( $h2 );

		$p = $session->make_element( "p", style=>"text-align: left; margin:
1em auto 0em auto" );
		
		$p->appendChild( $eprint->render_value( "abstract_other" ) );		
						
		$div->appendChild( $p );
	}
	else
	{
		$page->appendChild( $session->make_element( 'br' ) );
	}






I can get only the first one (english).

How can I render the other instances??


Cheers,

Lourdes


Universidad Complutense de Madrid
Spain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20140320/f873421a/attachment.html 


More information about the Eprints-tech mailing list