Share » Forums » Developer » Custom template tag (like {literal})...

Custom template tag (like {literal}) possible?

Custom template tag (like {literal}) possible?

Thursday 23 June 2011 3:10:00 am - 2 replies

Author Message

André R.

Thursday 23 June 2011 4:30:55 am

Nope, eztemplate is black magic when it comes to these things, as it's two separate code paths for compiled and interpreted mode.
If you survive to tell the tale we'll buy you a cookie :)
But! Template-blocks are hardcoded into the parsers, so it is AFAIK not something you can extend from extensions. So if I where you I would try to go another route on this one, at least until we have changed our template engine to something else.

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

Marko Žmak

Thursday 23 June 2011 1:13:23 pm

Well one way to do it would be to create a custom template operator to which you will pass the CoffeScript code, and which will then generate the desired output.

P.S. In case you wondered, strings in eZP template can be multiline.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

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

36 542 Users on board!

Forums menu