[Zope] #include with DocumentTemplate?
Chris Beaumont
cbeaumon@msri.org
Thu, 3 May 2001 15:17:51 -0700
Lance,
Do you mean <dtml-var "myDTMLmethodtobeincluded"> ?
Of course, any DTML method will be parsed when the page is viewed,
using its context, not rendered into a static file beforehand..
that's the single biggest plus to using Zope, I think..
:)
HTH,
Chris
>I'm fairly new to Python and when I asked this question on a couple of
>the python.org mailing lists, I was told I should probably ask here
>instead.
>
>I'm writing some CGIs in Python and I borrowed the DocumentTemplate
>module from Zope because it does most of what I need. However, there's
>one thing that it apparently doesn't do that I would really like. And
>that would be to use "#include" tags to read in other DTML documents
>and parse them. That is, tags like this:
>
> <!--#include name="header.dtml" -->
>
>Does DocumentTemplate already handle that? I couldn't find it in the
>documentation.
>
>If it's not already built-in, is it possible to add such a tag? I've
>seen the examples on zope.org for adding tags to DocumentTemplate's
>parser, but I don't know if its possible to get it to read a new file
>and parse it in the middle of parsing another template. Has anybody
>already implemented this?
>
>Thanks in advance.
>