[Zope] Bug or Feature (dtml-in)?

Lars Heber Lars.Heber@t-systems.com
Fri, 06 Dec 2002 14:04:04 +0100


Hello list,

I just found s. th. really strange with the following code::

<dtml-in "objectValues(['Folder'])" skip_unauthorized="1" sort="index">
  <dtml-if sequence-start><!-- &dtml-id; start --><ul></dtml-if>
  <dtml-if "id != 'templates' and
_.getitem(id).objectValues(['Datenblatt'])">
    <li><a style="font-size:16pt"
href="&dtml-absolute_url;/doSomething"><dtml-var title_or_id></a></li>
  </dtml-if>
  <dtml-if sequence-end></ul></dtml-if>
</dtml-in>

Worked fine, except that if one wasn't authorized to access a folder,
the property sequence-start was always set - resulting in repeated
<ul>s.

But by using the prefix attribute it worked:

<dtml-in "objectValues(['Folder'])" skip_unauthorized="1" sort="index"
prefix="mySequence">
  <dtml-if mySequence-start><!-- &dtml-id; start --><ul></dtml-if>
  <dtml-if "id != 'templates' and
_.getitem(id).objectValues(['Datenblatt'])">
    <li><a style="font-size:16pt"
href="&dtml-absolute_url;/uebersichtArtikelgruppe"><dtml-var
title_or_id></a><br /><br /></li>
  </dtml-if>
  <dtml-if mySequence-end></ul></dtml-if>
</dtml-in>

I think something is going wrong here with the namespaces, or did I miss
something.
Just a question / suggestion...
--
Lars Heber

T-Systems GEI GmbH
Hausanschrift: Clausstrasse 3, 09126 Chemnitz
Postanschrift: Clausstrasse 3, 09126 Chemnitz
Telefon : (+49 371) 5359-271
Fax     : (+49 371) 5359-133
E-Mail  : Lars.Heber@t-systems.com
Internet: http://www.t-systems.de