texttoimage and multiline

texttoimage and multiline

Monday 24 May 2004 9:14:50 am - 1 reply

Author Message

Ronan Guilloux

Wednesday 27 August 2008 3:29:52 am

You can use wrap operator on texttoimage :

{$node.name|wrap(20)|texttoimage( 'arial',,20,,,'#064D95',,,,5 )}

or use a special character (like '$') to introduce a word wrap at a specific place in the string :

{if $node.name.content|contains('$')}
{def $wrappedTitleArr = $node.name.content|explode( '$' )}
<h2>
{for 0 to $wrappedTitleArr|count|dec as $counter}
{$wrappedTitleArr[$counter]|texttoimage( 'arial',,20,,,'#064D95',,,,5 )}
{delimiter}<br />{/delimiter}
{/for}
</h2>
{undef $wrappedTitleArr}
{/if}

--
Ronan Guilloux
www.mazedia.fr
www.coolforest.net

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.