What comes first? Charset or TTL declaration? ;)

Author Message

Piotrek Karaś

Friday 19 December 2008 3:19:06 am

I need to declare two things in my node template:
- that view cache will not be user
- that the template will be utf-8 encoded

How do I proceed? Seems tricky ;)

{*?template charset=utf-8?*}
{set-block scope=root variable=cache_ttl}0{/set-block}

or

{set-block scope=root variable=cache_ttl}0{/set-block}
{*?template charset=utf-8?*}

Or maybe something else?

Of course, it is possible to define default encoding, but let's assume that's not a possibility at this point.

Any ideas?

Thanks,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

André R.

Friday 19 December 2008 3:39:43 am

Charset first, cache_ttl can be set anywhere in the template, also in sub templates if you remember to set scope=global. (but it will affect the whole view of course, so you can't define different ttl's for different parts of one view.)

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Piotrek Karaś

Friday 19 December 2008 4:22:02 am

Yup, just confirmed that, good to know, though. Thanks!

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

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 19:16:01
Script start
Timing: Jan 18 2025 19:16:01
Module start 'layout'
Timing: Jan 18 2025 19:16:01
Module start 'content'
Timing: Jan 18 2025 19:16:02
Module end 'content'
Timing: Jan 18 2025 19:16:02
Script end

Main resources:

Total runtime0.8377 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 588.0469152.6406
Module start 'layout' 0.00660.0028 740.687539.4766
Module start 'content' 0.00940.8264 780.1641550.1406
Module end 'content' 0.83580.0017 1,330.304712.1250
Script end 0.8375  1,342.4297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4065160.0002
Check MTime0.00140.1667160.0001
Mysql Total
Database connection0.00110.133710.0011
Mysqli_queries0.776292.6592570.0136
Looping result0.00060.0758550.0000
Template Total0.791494.520.3957
Template load0.00240.286020.0012
Template processing0.789094.182120.3945
Template load and register function0.00010.011410.0001
states
state_id_array0.00130.160710.0013
state_identifier_array0.00150.178220.0007
Override
Cache load0.00210.2469220.0001
Sytem overhead
Fetch class attribute can translate value0.00090.104620.0004
Fetch class attribute name0.00210.256350.0004
XML
Image XML parsing0.00110.127020.0005
class_abstraction
Instantiating content class attribute0.00000.001460.0000
General
dbfile0.00100.1161240.0000
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs