you would just need to escape the $, and the output sent to the client will
then be a correctly marked up dojo templatefor? Don't remember how to
escape the ${} expression in mako. In evoque templating
(http://evoque.gizmojo.org/ -- a super fast lightweight generic text
templating for python 2 and 3 ;-) all you'd need to do is to double the $
i.e. the '${...}' becomes the '$${...}'.mario On Fri, 12 Jun 2009 15:01:34 +0700, heru susanto <[email protected]> wrote: > hello all, > > I try using dojo toolkit (http://www.dojotoolkit.org/) with Mako template > in > pylons. There is a problem since mako and dojo share same template ( ${ } > ). > if in javascript function I have code like this: > > <script type="text/javascript"> > ..... > var result = ... > var node = dojo.byId("mynode"); > node.innerHTML = > dojo.string.substitute("<a href='${url}'>${title}</a>", result); > ..... > </script> > > pylons will treat the '${url}' as Mako template, and an > NameError("Undefined") raised > > is there any suggestions for that ? > > thank you, > > heru - indonesia --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
