<span class="gmail_quote"></span>I'm trying to list all the &quot;files objects&quot; in a folder with their metadata descriptions in a ZPT page thru written thru the ZMI.<br><div style="direction: ltr;"><br>I'm successfully accessing the metadata description of a single file with:
<br>
<br>&lt;p tal:replace=&quot;context/a_folder/a_file_in_a_folder/zope:description&quot;&gt;&lt;/p&gt;<br><br>but when I try to iterate all the files I'm stuck with the correct syntax:<br><br>&lt;div tal:repeat=&quot;item context/a_folder&quot;&gt;
<br>&nbsp; file:&lt;p tal:replace=&quot;item&quot;&gt;filename&lt;/p&gt;&lt;BR&gt; &lt;!-- This line work correctly --&gt;<br>&nbsp; desc:&lt;p tal:replace=&quot;item/zope:description&quot;&gt;description&lt;/p&gt;&lt;BR&gt; &lt;!-- this line create a system error --&gt;
<br>&lt;/div&gt;<br><br>Is there someone who can tell me the correct way to do this ?<br><br><br>
 <div>
  <pre>Traceback (innermost last):<br>  Module zope.publisher.publish, line 138, in publish<br>    result = publication.callObject(request, object)<br>  Module zope.app.publication.zopepublication, line 164, in callObject
<br><br>    return mapply(ob, request.getPositionalArguments(), request)<br>  Module zope.publisher.publish, line 113, in mapply<br>    return debug_call(object, args)<br>   - __traceback_info__: &lt;bound method ZPTPageEval.index
<br> of &lt;zope.app.publisher.browser.viewmeta.ZPTPageEval object at 0x419cd3ac&gt;&gt;<br>  Module zope.publisher.publish, line 119, in debug_call<br>    return object(*args)<br>  Module zope.app.zptpage.browser.zptpage
, line 29, in index<br><br>    return template.render(request, **kw)<br>  Module zope.app.zptpage.zptpage, line 92, in render<br>    sourceAnnotations=debug_flags.sourceAnnotations)<br>  Module zope.pagetemplate.pagetemplate
, line 117, in pt_render<br><br>    strictinsert=0, sourceAnnotations=sourceAnnotations)()<br>  Module zope.tal.talinterpreter, line 270, in __call__<br>    self.interpret(self.program)<br>  Module zope.tal.talinterpreter
, line 345, in interpret<br>
    handlers[opcode](self, args)<br>  Module zope.tal.talinterpreter, line 837, in do_loop_tal<br>    self.interpret(block)<br>  Module zope.tal.talinterpreter, line 345, in interpret<br>    handlers[opcode](self, args)<br>

  Module zope.tal.talinterpreter, line 529, in do_optTag_tal<br>    self.no_tag(stuff[-2], stuff[-1])<br>  Module zope.tal.talinterpreter, line 511, in no_tag<br>    self.interpret(program)<br>  Module zope.tal.talinterpreter
<br>, line 345, in interpret<br>    handlers[opcode](self, args)<br>  Module zope.tal.talinterpreter, line 618, in do_insertText_tal<br>    text = self.engine.evaluateText(stuff[0])<br>  Module zope.app.pagetemplate.engine
, line 101, in evaluateText<br><br>    text = self.evaluate(expr)<br>  Module zope.tales.tales, line 698, in evaluate<br>    return expression(self)<br>   - /LocalWeb/index2.html<br>   - Line 12, Column 7<br>   - Expression: &lt;PathExpr standard:u'item/zope:description'&gt;
<br><br>   - Names:<br>      {'args': (),<br>       'container': &lt;zope.app.folder.folder.Folder object at 0x41e54e6c&gt;,<br>       'context': &lt;zope.app.folder.folder.Folder object at 0x41e54e6c&gt;,<br>       'default': &lt;object object at 0x4039e488&gt;,
<br><br>       'loop': {},<br>       'nothing': None,<br>       'options': {},<br>       'repeat': {},<br>       'request': &lt;zope.publisher.browser.BrowserRequest instance URL=<a href="http://immocontrole.ca:8080/LocalWeb/index2.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

http://immocontrole.ca:8080/LocalWeb/index2.html</a>&gt;,<br>       'template': &lt;zope.app.zptpage.zptpage.ZPTPage object at 0x4200b92c&gt;,<br>       'usage': &lt;zope.pagetemplate.pagetemplate.TemplateUsage object at 0x41bc298c&gt;}
<br><br>  Module zope.tales.expressions, line 204, in __call__<br>    return self._eval(econtext)<br>  Module zope.tales.expressions, line 191, in _eval<br>    ob = self._subexprs[-1](econtext)<br>  Module zope.tales.expressions
<br>, line 123, in _eval<br>    ob = self._traverser(ob, element, econtext)<br>  Module zope.app.pagetemplate.engine, line 57, in zopeTraverser<br>    request=request)<br>  Module zope.app.traversing.adapters, line 177, in traversePathElement
<br><br>    return traversable.traverse(nm, further_path)<br>  Module zope.app.traversing.adapters, line 61, in traverse<br>    raise TraversalError(subject, name)<br>   - __traceback_info__: (&lt;zope.app.pagetemplate.talesapi.ZopeTalesAPI
<br> object at 0x4203a48c&gt;, 'description', [])<br>TraversalError: (&lt;zope.app.pagetemplate.talesapi.ZopeTalesAPI object at 0x4203a48c&gt;, 'description')<br></pre>
 </div>

<br clear="all"><br>-- <br>Nicolas Legault<br>Recherche Et Développement<br>Immo Contrôle Inc<br>Tel: 514 272-3453 Ext 2<br>Fax: 514 272-3453

</div>