Forums / Developer / What comes first? Charset or TTL declaration? ;)

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