Tip: Using Curly Braces in texttoimage

Author Message

Alex Jones

Tuesday 27 April 2004 11:52:36 am

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

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Alex Jones

Tuesday 27 April 2004 12: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

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Bjørn Kaarstein

Tuesday 27 April 2004 1: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

Alex Jones

Tuesday 27 April 2004 1:28:33 pm

Actually, the fact that it was within a header tag was a mistake. ;) 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. :(

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

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

eZ debug

Timing: Jan 18 2025 16:17:23
Script start
Timing: Jan 18 2025 16:17:23
Module start 'layout'
Timing: Jan 18 2025 16:17:23
Module start 'content'
Timing: Jan 18 2025 16:17:23
Module end 'content'
Timing: Jan 18 2025 16:17:23
Script end

Main resources:

Total runtime0.0175 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 589.4609152.6406
Module start 'layout' 0.00680.0038 742.101639.4766
Module start 'content' 0.01060.0051 781.578193.4609
Module end 'content' 0.01570.0017 875.039134.3047
Script end 0.0174  909.3438 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002715.5994140.0002
Check MTime0.00116.4171140.0001
Mysql Total
Database connection0.00105.791010.0010
Mysqli_queries0.003318.715230.0011
Looping result0.00000.131010.0000
Template Total0.00147.810.0014
Template load0.00084.308110.0008
Template processing0.00063.460910.0006
Override
Cache load0.00053.129410.0005
General
dbfile0.00021.334280.0000
String conversion0.00000.081940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs