[Zope] use of objectValues() in DTML Methods vs. DTML Documents

Mike Bannister mike@geekteam.com
Wed, 25 Oct 2000 05:44:29 -0400


Hi,

I'm working my way through the beta-book on zope.org and having a blast
generally but I'm hoping someone can check my thinking here and tell me if
I'm on the right track. Thanks in advance for any insight you can offer.

In chapter 3, where DTML is first introduced, they have me create a Folder
with some files in it and include something like this in a DTML Method:

        <dtml-in expr="objectValues('File')">

          <a href="&dtml-absolute_url;"><dtml-var title_or_id></a><br>

        </dtml-in>

Just for the heck of it I dropped that same code into a DTML Document in the
same Folder and it didn't list the Files as I had expected. I understand
pretty much the differences of Methods and Documents and I'm assuming the
reason for this is related to the way the Documents exists in it's own
namespace and the Method doesn't... so my best guess for this behavior is
that the 'scope' of objectValues() is limited to the current namespace.

Am I even close? If not can someone explain this to me?

Thanks!
Mike Bannister
geekteam.com