tag:blogger.com,1999:blog-4477131926658044957.post3710660150626112416..comments2023-05-28T03:47:58.240-07:00Comments on pydanny: What I would change in Plone: Templatespydannyhttp://www.blogger.com/profile/00481523876497446983noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-4477131926658044957.post-73781426693686641712009-04-05T08:27:00.000-07:002009-04-05T08:27:00.000-07:00@Alex: That cheat sheet is awesome. I learned some...@Alex: That cheat sheet is <B>awesome</B>. I learned some template tricks I didn't know just by looking at it. Now if we can just get a HTML version of it in the formal Plone docs I would be done complaining about this issue. :)pydannyhttps://www.blogger.com/profile/00481523876497446983noreply@blogger.comtag:blogger.com,1999:blog-4477131926658044957.post-86079466525645468362009-04-04T06:02:00.000-07:002009-04-04T06:02:00.000-07:00@Martin Aspelli: While it does mean two things to ...@Martin Aspelli: While it does mean two things to learn for new developers, it also means that people who don't like (or more likely HATE - yes HATE in caps) XML style template have another option. <BR/><BR/>As for getting DTL to run in Plone of 5 minutes of research leads me to believe it is not trivial. Yet another 5 minutes demonstrated that getting Jinja2 templates to run in Plone is. From inside a Plone debug shell:<BR/><BR/>>>> from jinja2 import Template<BR/>>>> t = Template('{{ name }} rocks!')<BR/>>>> t.render(name='Guido')<BR/>u'Guido rocks!'<BR/><BR/>Reusing TAL inside of Jinja2 and Jinja2 inside of TAL is another. But using Jinja2 as a template language inside Plone/Zope/Grok python code is easy. Which makes me wonder how useful it would be for helping to render AJAX, especially combined with KSS. I plan to write a blog post about this very subject.pydannyhttps://www.blogger.com/profile/00481523876497446983noreply@blogger.comtag:blogger.com,1999:blog-4477131926658044957.post-45126834579252095212009-04-04T05:49:00.000-07:002009-04-04T05:49:00.000-07:00@Ian Bicking: Thanks for suggesting jinja2. I've d...@Ian Bicking: Thanks for suggesting jinja2. I've discovered this morning that getting Django templates to run inside of Plone is not trivial, but getting Jinja templates to run is. :)pydannyhttps://www.blogger.com/profile/00481523876497446983noreply@blogger.comtag:blogger.com,1999:blog-4477131926658044957.post-26838697230278410312009-04-04T04:34:00.000-07:002009-04-04T04:34:00.000-07:00OK How about: thisOK How about: <A HREF="http://svn.plone.org/svn/collective/collective.cheatsheets/trunk/collective/cheatsheets/browser/resources/pdf/plone-cheatsheets-3.0.pdf" REL="nofollow">this</A>Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4477131926658044957.post-45329755223023754852009-04-03T20:24:00.000-07:002009-04-03T20:24:00.000-07:00I'm not sure everybody wins if we have two templat...I'm not sure everybody wins if we have two template languages. It means two things to learn for new developers, two things to test and maintain for the core developers, and I bet it'd be pretty hard to re-use a macro/snippet from one template in another.<BR/><BR/>I agree that non-XML templating should be easier. chameelon.zpt helps here by allowing standalone ${name} variable interpolations. Three may be a case for a different language for non-XML/HTML pages even, but not for producing HTML output.Martin Aspelihttps://www.blogger.com/profile/11251335463579376973noreply@blogger.comtag:blogger.com,1999:blog-4477131926658044957.post-29118549322717114672009-04-03T20:22:00.000-07:002009-04-03T20:22:00.000-07:00If you want something like Django Templates, you s...If you want something <I>like</I> Django Templates, you should certainly use <A HREF="http://jinja.pocoo.org/2/" REL="nofollow">Jinja</A>.Ian Bickinghttps://www.blogger.com/profile/14191618747406426837noreply@blogger.comtag:blogger.com,1999:blog-4477131926658044957.post-28469658314287988032009-04-03T18:28:00.000-07:002009-04-03T18:28:00.000-07:00@Alex Clark: This is a great document. But it is m...@Alex Clark: This is a great document. But it is more description of usage of TAL and Macros, rather than a list of all the functions and methods available.pydannyhttps://www.blogger.com/profile/00481523876497446983noreply@blogger.comtag:blogger.com,1999:blog-4477131926658044957.post-74331706241725421102009-04-03T17:20:00.000-07:002009-04-03T17:20:00.000-07:00You might try: http://docs.zope.org/zope2/zope2boo...You might try: http://docs.zope.org/zope2/zope2book/source/ZPT.html (The Zope 2 docs just got overhauled by Hanno Schlichting, after they moved off plope.com.)Anonymousnoreply@blogger.com