[Zope] Re: tal assignment

Philipp von Weitershausen philipp at weitershausen.de
Thu Sep 7 21:11:13 EDT 2006


David Bear wrote:
> I wanted to assign a list object to a tal global variable but I can't
> seem to find the correct syntax. I tried:
> 
> <div tal:define="global mylist=['item1', 'item2']" 
>      tal:content="">
>      blah
> </div>


<div tal:define="mylist python:['item1', 'item2']"
      tal:content="mylist">
This will print "['item1', 'item2']"
</div>



More information about the Zope mailing list