[Zope] Scan documents/properties

Francois-Regis CHALAOUX Francois-Regis.CHALAOUX@sanofi-synthelabo.com
Tue, 18 Jan 2000 15:18:00 +0100


Hi Zoppistes,

With the listConf method, I'm scanning the DTML document of the conf folder
(see Zope tree below) then,
I render the values of  these document properties ( id, title, author).

======================
Problem
======================

It's working with id and title but *not with author*
Why?

======================
Zope Tree
======================

/listConf  ['DTML Method']
/conf ['folder']
   conf1  ['DTML Document]
   conf2  ['DTML Document]

======================
The DTML listConf Method :
======================

<!--#in "['DTML Document']"-->
<!--#if "objectValues(_['sequence-item'])"--> 
      <!--#with conf-->
      <!--#in "objectValues(_['sequence-item'])"-->
        <a href="conf/<!--#var id-->"><!--#var title-->, <!--#var author-></a>
      <!--#/in-->
      <!--#/with-->
<!--#/if-->
<!--#/in-->

======================
The ERROR
======================
<!--
 Error type:  KeyError
 Error value: author
 -->
</BODY></HTML>
<!--
Traceback (innermost last):
  File /opt/zope/Zope-2.1.2/lib/python/ZPublisher/Publish.py, line 214, in
publish_module
  File /opt/zope/Zope-2.1.2/lib/python/ZPublisher/Publish.py, line 179, in
publish
  File /opt/zope/Zope-2.1.2/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
    (Object: ElementWithAttributes)
  File /opt/zope/Zope-2.1.2/lib/python/ZPublisher/Publish.py, line 165, in
publish
  File /opt/zope/Zope-2.1.2/lib/python/ZPublisher/mapply.py, line 160, in
mapply
    (Object: listeConf)
  File /opt/zope/Zope-2.1.2/lib/python/ZPublisher/Publish.py, line 102, in
call_object
    (Object: listeConf)
  File /opt/zope/Zope-2.1.2/lib/python/OFS/DTMLMethod.py, line 145, in
__call__
    (Object: listeConf)
  File /opt/zope/Zope-2.1.2/lib/python/DocumentTemplate/DT_String.py, line
502, in __call__
    (Object: listeConf)
  File /opt/zope/Zope-2.1.2/lib/python/DocumentTemplate/DT_In.py, line 691, in
renderwob
    (Object: ['DTML Document'])
  File /opt/zope/Zope-2.1.2/lib/python/DocumentTemplate/DT_With.py, line 148,
in render
    (Object: conf)
  File /opt/zope/Zope-2.1.2/lib/python/DocumentTemplate/DT_In.py, line 691, in
renderwob
    (Object: objectValues(_['sequence-item']))
KeyError: (see above)

-->