If I try your suggestion wiht _.getitem(_['sequence-item']) 
(If I remember well this was the first I tried).

<dtml-call "REQUEST.set('rangList','folder1;folder2;folder2')"> 
<dtml-in " _.string.split(rangList,';')"> 
   <dtml-with "_.getitem(_['sequence-item'])"> 
    <dtml-let index=sequence-index>
      <dtml-call "manage_changeProperties({'rang':index})"> 
    </dtml-let>  
  </dtml-with> 
</dtml-in>  

I get this error: File
D:\packages\Zope\WEBSIT~3\lib\python\DocumentTemplate\DT_In.py, line 691, in
renderwob     (Object:  _.string.split(rangList,';'))   File
D:\packages\Zope\WEBSIT~3\lib\python\DocumentTemplate\DT_With.py, line 133, in
render     (Object: _.getitem(_['sequence-item']))   File
D:\packages\Zope\WEBSIT~3\lib\python\DocumentTemplate\DT_Util.py, line 337, in
eval     (Object: _.getitem(_['sequence-item']))    (Info: _)


Still any hints. Thanks.



On Tue, 16 Jan 2001, Steve Alexander wrote:
> Arno Gross wrote:
> 
> > Suppose I have a list of existing folder objects and depending
> > on their index in the list I want to set a property called 'rang'.
> > 
> > I assumed you could something like this:
> > 
> > 
> > <dtml-call "REQUEST.set('rangList','folder1;folder2;folder2')"> 
> > (normally the list comes from outside)
> > 
> > <dtml-in " _.string.split(rangList,';')">   
> >   <dtml-with "_.getitem('sequence-item')">   
> 
> Here, you're getting an item with the literal id 'sequence-item'.
> 
> What you mean is to get the item with the id described by the variable 
> sequence-item. So, use:
> 
>      <dtml-with "_.getitem(_['sequence-item'])">
> 
> Hope that helps.
> 
> 
> This really is a [EMAIL PROTECTED] question, not a [EMAIL PROTECTED] 
> question. Please do try to choose the appropriate list for the question. 
> Thanks.
> 
> --
> Steve Alexander
> Software Engineer
> Cat-Box limited
> http://www.cat-box.net

_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to