[ZPT] Nesting templates

Max Romantschuk max@provico.fi
Wed, 20 Nov 2002 20:05:53 +0200


Hello eveyone,

I'm new to the list and Zope, but I do have a lot of experience with we
development (HTML, several programming languages and SQL). I found Zope some
time ago and thought I'd make myself a simple site to learn something.

I have, however, run into problems. The problems are mainly that I don't
know what tools to use to achieve my goals. I'll try to explain what I'm
trying to do...

My basic idea is to build a site wich would have the following basic
properties

1. Dynamic navigation
2. Master template through which all content is fetched

I've been trying to do this by doing a sturcture like this:

  site_root/index_html
Site master template

  site_root/content
Folder with all content, as page templates, containing just the content, no
reference to the master template. This folder is indexed by the navigation.
Any special case functionality can then be put in the root.

Then I've been trying to create a script to fetch the correct content and
display it. I realize some feel that templates are not content or that I
should use CMF, but I want to build something from the ground up to learn.

I've been trying to get the master template to include the nested content
template by using a tal:content="structure ..." type of syntax, but it seems
that this only works when I statically try to give the path to the content.
I've been looking all over the web for a proper spec on how this
"structure"-keyword is suppose to work, but haven't really found anything.

So really my question comes down to: how do I nest a template? Should I even
be doing this?

CMF I don't wish to use at the moment though. Too complex and too rigid for
my taste. I've looked at Kubes, but they looked too much like a kludge.

  Thanks in advance,
Max Romantschuk