[Zope] Automatic inclusion help

Chris McDonough chrism@digicool.com
Mon, 31 Jan 2000 23:42:42 -0500


Maybe this question will clear this quesstion up for me... why wouldn't
you put a "custom" standard_html_header method into each differing
folder and just call that method in all your documents?  Why have a
'folderid'_html_header?

"M. Adam Kendall" wrote:
> 
> 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)
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

-- 
Chris McDonough
Digital Creations, Inc.
Zope - http://www.zope.org