[Zope] another tal question
J Cameron Cooper
jccooper at jcameroncooper.com
Tue Dec 2 15:14:50 EST 2003
Kate Legere wrote:
>As this doesn't work for me, can I safely assume that I will need to import
>the Products.PythonScripts.standard package as something separate from my
>original Zope installation - I didn't handle the installation myself.
>
>
Zope will always come with this. It doesn't work because I screwed up. I
was doing it by memory and didn't do it right. Try this instead::
<b tal:define="pss modules/Products/PythonScripts/standard"
tal:content="python: pss.newline_to_br(item.description)"> news </b>
>The DTML transform methods are available in the
>Products.PythonScripts.standard package. You can do::
>
> <b tal:define="pss python:Products.PythonScripts.standard"
>tal:content="python: pss.newline_to_br(item.description)"> news </b>
>
>The default operation of taL:content does an HTML quote, but you can nest
>such calls if you like. Of course, you can expand the 'pss' and forget the
>'define' or define the shortcut to the library higher up.
>
--jcc
--
"Code generators follow the 80/20 rule. They solve most of the problems, but not all of the problems. There are always features and edge cases that will need hand-coding. Even if code generation could build 100 percent of the application, there will still be an endless supply of boring meetings about feature design."
(http://www.devx.com/java/editorial/15511)
More information about the Zope
mailing list