[Zope] site structure (fwd)
Oleg Broytmann
Oleg Broytmann <phd@mail2.phd.pp.ru>
Thu, 14 Dec 2000 21:32:16 +0300 (MSK)
On Thu, 14 Dec 2000, Nuno Goncalves wrote:
> humm !!! I see now !!
> So i can have a general structure for all my site and when create a
> page, specifying the template to use and consequently adding the objects
> that i want ??
No, you should separate design (template) and content. Actually, it is
possible even without creating a python product - you put content (HTML
fragments) into small DTML Documents, and define design (template) using
DTML Methods - standard_html_header/footer and other methods, your custom
methods.
Think, for example, you want to create a site with the following design:
-------------------------------------
| | |
left | CONTENT1 | right |
column | | column |
| special | |
| fature | |
| | |
| CONTENT2 | |
| | |
-------------------------------------
Easy! (Thanks, Zope! :)
You define "left column" in standard_html_header, "right column" in
standard_html_footer, in every folder put two pieces of content and feature
into 3 DTML Documents, and call these Documents again from
standard_html_header (or DTML Methods that will be called from
standard_html_header).
In outline, your standard_html_header will looks like the following:
<HTML><HEAD><TITLE><dtml-var title_or_id></TITLE></HEAD>
<table><dtml-comment>I'll skip most HTML-related things like tr td etc</dtml-comment>
<dtml-var left-column>
<dtml-var CONTENT1>
<dtml-var feature>
<dtml-var CONTENT2>
Oleg.
----
Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.