Title: Clear Day
I've dug around, but not found (or not grokked) the solution to this
particular puzzle.  Could someone more knowledgeable provide a little
In the top level folder (root) I have a dtml method title template
that contains html code and dtml vars that are (intended to be)
populated by properties of various subfolders as well as a value or
two passed directly.  The title template is "called" from dtml
methods in the root and sub-folders using something like:
<dtml-var "title_block(app_screen = 'Main Screen')">
I have no problem getting at the title template from any of the dtml
methods.  (Thanks to acquistion, yes?)
However, I get Zope KeyErrors indicating that the title template is
not seeing the sub-folder properties in its namespace, when I plug
the above code into a dtml method contained in one of those sub-
folders.  Here's the title_block code:
<table border=1
<dtml-if "_.has_key('titleblock_bg')">
  bgcolor="<dtml-var titleblock_bg>"
<TR><TD align=center>
        <FONT size=7
<dtml-if "_.has_key('title_fg')">
  color="<dtml-var title_fg>"
><dtml-var app_title></FONT><BR>
        <FONT size=4
<dtml-if "_.has_key('subt_fg')">
  color="<dtml-var subt_fg>"
><dtml-var app_subt></FONT><HR>
        <FONT size=5
<dtml-if "_.has_key('screen_fg')">
  color="<dtml-var screen_fg>"
><dtml-var app_screen></FONT>
(Ok, try not to laugh too hard - I'm Zope newbie...)
Some values above are optional (the has_key stuff).  Values like
app_screen may be passed explicitly as literals.  The rest (like
app_title) was intended to be grabbed from the folder/sub-folder
properties I set up for that purpose.
So, two questions:
1. Is there a simple way to pass the appropriate sub-folder
properties namespace from a dtml method contained in that sub-folder
to the title_block dtml method contained in the root folder?  An
example would be tremendously helpful.
2. Is there a better way to do what I'm trying to do?

Thanks for any help,
Charlie Wilkinson - TRIS Development Systems Administrator
Phone: 202-283-3241
MSMail:   Charlie E Wilkinson
This message constructed from 90% post-consumer electrons.


Reply via email to