12 Jan 2010 10:56
Re: How to disabe ${php: XXXX} forced echo?
On 11 Jan 2010, at 21:07, <theman@...> <theman@...> wrote: > Is there anyway to prevent PHPTAL from automatically echoing the > result of > ${php: XXXX}? There's no explicit way to do it. You could wrap call in function that returns nothing (e.g. substr(XXXX,0,0)). > I have integrated PHPTAL with Zend Framework and Dojo but > have an issue when attempting to use dojo().onLoadCaptureStart(). > > // inline-content.tpl.html > <tal:block> > ${helper: dojo().onLoadCaptureStart()} > function _initLoader() { > dojo.parser.parse(dojo.body()); > dojo.fadeOut({ > node: "loader", > duration: 420, > onEnd: function() { > dojo.byId('loader').style.display = "hidden"; > dojo.byId('layoutContent').style.display = "inherit"; > } > }).play(25); > } > ${helper: dojo().onLoadCaptureEnd()} Does Dojo expect to get HTML/XML markup as input, or unescaped script? If the latter, you might get nasty surprise when you use '&' or '<'. > Oh, while I'm thinking > about it, is there a way to do multi-line ${} tags so I don't have > to have > such a long line? Something like: > > ${structure helper: > dojo().requireModule('dojo.parser') > .requireModule('dijit.Form')} I could add that. -- -- regards, Kornel
RSS Feed