This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Setup & design » Tip: Using Curly Braces in texttoimage
expandshrink

Tip: Using Curly Braces in texttoimage

Tip: Using Curly Braces in texttoimage

Tuesday 27 April 2004 8:52:36 pm - 3 replies

If you want to show the curly braces in an image generated via <i>texttoimage</i> make sure to not use the wash operator at the same time as it will cause all sorts of problems. For example this code will work:

{concat('{ ', $node_name, ' }')|texttoimage( 'nav_header' )}

This will not:

{concat('{ ', $node_name, ' }')|wash|texttoimage( 'nav_header' )}

nor will

{concat('{literal}{{/literal} ', $node_name, ' {literal}}{/literal}')|wash|texttoimage( 'nav_header' )}

Alex

Tuesday 27 April 2004 9:27:30 pm

Actually, I wrote too soon. I ran into a few more problems, but I eventually solved the problem using a variable:

{set-block scope=global variable=specialhead}{literal}{{/literal} {$node_name|wash} {literal}}{/literal}{/set-block}
<h1>{$specialhead|texttoimage( 'nav_header' )}</h1>
{/let}

Alex

Tuesday 27 April 2004 10:16:05 pm

Hi Alex.

Is there any particular reason why you use the |texttomimage operator on your header?
I've never used it myself, and new ideas are always welcome!

Regards Bjørn

Tuesday 27 April 2004 10:28:33 pm

Actually, the fact that it was within a header tag was a mistake. blunk.gif Emoticon I had begun to tinker with the header and just forgot to drop the the header tags when I shifted to using <i>texttoimage</i>. I've begun playing with <i>texttoimage</i> for some menus which I would like to use a specific font that is not installed on most machines. So, my use is purely design-oriented. Though at the moment the system is confusing me no end, so who knows if I'll end up using it. sad.gif Emoticon

Alex

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from