[Zope] How to render tales in strings in a script
Elena Schulz
elena.schulz@gmx.net
Thu, 9 Jan 2003 11:06:39 +0100
Hi Dieter, thanks a lot
> You create a Zope Page Template object, wrap it into a context
> (using its "__of__" method) and then call it.
You mean by the following?
#creating:
myZPT = Products.PageTemplates.ZopePageTemplate(id=myId, text=myZPTString,
content_type=?)
#wrapping: I did not find any __of__ method!? (Sorry my understanding of
this needs some more enlightment
myZPT=context.myZPT
#calling:
return context.myId()
What to use for content_type? text/html? or better keeping the default?
-- many thanks for your great help, Elena
you wrote:
> Not a very big problem in an External Method:
>
> You create a Zope Page Template object, wrap it into a context
> (using its "__of__" method) and then call it.
>
> Few chances in an (internal) Python Script, as you will not be allowed
> to call "__of__".
> Without this "__of__", the template has no way to know its
> context (e.g. "here", "container", ...).
>
>
> Dieter
>