[ZPT] how to include an HTML-fragment in a ZPT?
Roland Schätzle
roland.schaetzle@adviion.de
Fri, 11 May 2001 13:19:40 +0200
> > I have a Page Template in which I would like to include a HTML document
> [snip]
> > The only solution I found is
> > <p tal:content="text here/aText">dummy</p>
> > But in this case "aText" has also to be a Page Template.
>
> What do you mean? "aText" should be able to be *anything* that has a text
> value.
"aText" should be a file contianing some HTML code, e.g.
<p>some text</p>
<p> more text</p>
>
> > Another variant I tested is
> > <p tal:replace="structure nocall:here/aText.html">dummy</p>
> > But here the literal HTML source is included in my document which is not
> > what I want.
>
> The 'nocall:' is preventing "aText.html" from being executed. This should
> be:
>
> <p tal:replace="structure here/aText.html">dummy</p>
This leads to the following error:
exceptions.AttributeError on validate in ""
Traceback (innermost last):
[snip]
File C:\Programme\ZopeTest\lib\python\TAL\TALInterpreter.py, line 193, in
__call__
File C:\Programme\ZopeTest\lib\python\TAL\TALInterpreter.py, line 220, in
interpret
File C:\Programme\ZopeTest\lib\python\TAL\TALInterpreter.py, line 312, in
do_insertStructure
File C:\Programme\ZopeTest\lib\python\Products\PageTemplates\TALES.py,
line 272, in evaluateStructure
File C:\Programme\ZopeTest\lib\python\Products\PageTemplates\TALES.py,
line 258, in evaluate
TALESError: (see above)
Is there something wrong with my installation?
Roland