[Zope] DTML namespace lookups

Matt Gregory matthew.gregory@skyleach.com
Wed, 10 Apr 2002 13:48:32 -0400


In the following namespace:

psn
  |_images
  |_portals
       |_PatientPortal
             |_portlets
                 |_portlet_template
                 |_leftnav
                        |_images
                            |_Ahmonson

I have a dtml method in "leftnav" called "patientleftnav" which looks like:

<dtml-var portal_framework_footer>
<dtml-if groupname>
  <dtml-let imageDirectory="images[groupname]"
          dotpic="psn['portals']['dot_img']">
    <dtml-var patientleftnav_content>
  </dtml-let>
<dtml-else>
<dtml-let groupname="'Ahmanson'">
  <dtml-let imageDirectory="images[groupname]"
          dotpic="psn['portals']['dot_img']">
    <dtml-var patientleftnav_content>
  </dtml-let>
</dtml-let>
</dtml-if>

That method works fine, unless I call it from a method in "portlets" called
"portlet_template" which looks like:

<dtml-var portal_framework_header>

<dtml-var "leftnav['patientleftnav']()">
<dtml-with REQUEST>
  <dtml-if includeFile>
      <dtml-var "_[includeDir][includeFile]()">
  <dtml-else>
    No include file.
  </dtml-if>
</dtml-with>

The error I get:
Error Type: NameError
Error Value: global name 'images' is not defined

I'm guessing that the line: <dtml-var "leftnav['patientleftnav']()"> is
somehow not properly being executed in the proper namesapce, but I'm really
not understanding why, or how to fix this problem.