[Zope] Automatic inclusion help
M. Adam Kendall
mak@kha0s.org
Mon, 31 Jan 2000 23:08:33 -0500 (EST)
So here's the situation..
A client wants to automatically include a dtml method
in all dtml documents inside any given folder. So, using
standard_html_header, I should be able to create some
code to include 'folderid'_html_header. Right?
Is there something that I am missing here? For some
reason the dtml-if check doesn't work at all. I
need to have this check in place, just in case the
object doesn't exist in some folders.
<dtml-comment> Give us folderid_html_header </dtml-comment>
<dtml-let customhead="PARENTS[0].id + '_html_header'">
<dtml-comment> Check for object </dtml-comment>
<dtml-if customhead>
<dtml-comment> Object exists, render object </dtml-comment>
<dtml-var expr="_[customhead]">
<dtml-comment> End check </dtml-comment>
</dtml-if>
<dtml-comment> End namespace injection </dtml-comment>
</dtml-let>
Any ideas? Or am I going about it completely wrong?
--
M. Adam Kendall |
mak@kha0s.org | "There's never enough time to do
http://kha0s.org | all the nothing you want."
| --Bill Watterson (Calvin and Hobbes)