[Zope] Automatic inclusion help

M. Adam Kendall mak@kha0s.org
Tue, 01 Feb 2000 00:15:22 -0500 (EST)


Because the client still wants to include the standard_html_header from
the root to give the whole site the same look/feel.  But the client also
doesn't want to have to hard code all his documents with the specific 
folder header, in case they want to move a document from one folder to
another.  Does that make things a little clearer?


On 01-Feb-2000 Chris McDonough wrote:
> 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
> 
> _______________________________________________
> 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 )

-- 
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)