Let's take a closer look at the DTML code which generated the screen on the previous page. As you can see, this code block contains both HTML and DTML. When Zope processes this DTML Document instance, the DTML tags within it will be processed, and will be replaced with the resulting output. If you're familiar with PHP, JSP or ASP, this tag-based approach should already be familiar to you. The first line of code merely inserts the value of the DTML variable named "standard_html_header". This is one of the few predefined variables available in Zope, and, as the name suggests, it is used to display a common header for your site. Next, the lines fetch and display either the document's title or its ID. If no title is available (as is the case here, since I never specified one when I created the object), Zope will make do with the ID. Finally, the line inserts the value of another predefined Zope variable, "standard_html_footer". No prizes for guessing what this one's used for! Obviously, you can just as easily omit all the DTML code and use a static HTML document - like this one: Zope will look for DTML tags within it and, finding none, will simply render the HTML as is. ![]()
blog comments powered by Disqus |