[Zope] How to Defeat Acquisition

Chris McDonough chrism@digicool.com
Sat, 10 Mar 2001 13:25:28 -0500


----- Original Message ----- 
From: "Edmund Goppelt" <goppelt@goppelt.net>
To: <zope@zope.org>
Sent: Saturday, March 10, 2001 10:59 AM
Subject: [Zope] How to Defeat Acquisition


> I'd like to create a generic index_html for those folders that I
> haven't gotten around to creating a custom index_html.
> 
> So, create the default index_html in the root directory and let
> acquisition do the heavy lifting, right?
> 
> But, suppose I want to handle the inbetween case where there's
> custom text I'd like a folder to display, but not enough to justify
> writing a custom index_html?
> 
> How can I get my generic index_html to display the contents of a DTML
> method guts_html if it exists in a folder, *without* acquiring any
> guts_html from parent folders?  How do I defeat acquisition and have
> my generic index_html *only* look in the namespace of the folder it is
> called on?
> 
> Here's the generic index_html I have in my root directory which
> unfortunately acquires guts_html from folders higher up:
> 
> <dtml-var standard_html_header>
> <h2><dtml-var title></h2>
> 
> <dtml-var folderlist>
> 
> <dtml-var "PARENTS[0].guts_html" missing="">
> 
> <dtml-var standard_html_footer>

Untested, but this should do the trick..

<dtml-with "PARENTS[0]" only>
   <dtml-var guts_html>
</dtml-with>