silly problem that's got me stumped
I'm trying in my standard_html_header (Zope 2.3.3) to detect the presence of a certain property on a file in a folder (specially, the "content" DTML Method, which is invoked by the index_html code, which says <dtml-var standard_html_header> <dtml-var content> <dtml-var standard_html_footer> All pretty standard. Now, the problem is, that if I put a certain property on the content file in this folder, it seems to be inherited by all subfolders' content files. Is that true? What's the canonical way to say "for this particular content file, does it have the following property?" -- Cheers! Chris Ryland Em Software, Inc. www.emsoftware.com
What's the canonical way to say "for this particular content file, does it have the following property?"
<dtml-if "content.hasProperty('foo')"> ... </dtml-if> -- Florent -- Florent Guillaume, Nuxeo SARL (Paris, France) +33 1 40 33 79 10 http://nuxeo.com mailto:fg@nuxeo.com
Chris Ryland writes:
.... Now, the problem is, that if I put a certain property on the content file in this folder, it seems to be inherited by all subfolders' content files.
Is that true? No.
However, acquisition may trick you to find the "content" object in a much higher folder than you expect. Read "Containment before Context" in (e.g.) <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html> Dieter
participants (3)
-
Chris Ryland -
Dieter Maurer -
Florent Guillaume