[Zope] using sequence variables

Alexander Staubo alex@mop.no
Mon, 26 Jul 1999 07:15:55 +0200


Read through the DTML User's Guide.

Remember that

	<!--#var "something"-->

really means

	<!--#var expr="something"-->

and that

	<!--#var something-->

really means

	<!--#var name="something"-->

If you write something like <!--#var "sequence-item"-->, this is a
Python expression meaning "the value of the variable 'sequence' minus
the value of the variable 'item'". Instead, use:

	<!--#var expr="_['sequence-item']"-->

which extracts the variable from the namespace stack, just like

	<!--#var sequence-item-->

does.

-- 
Alexander Staubo             http://www.mop.no/~alex/
"QED?" said Russell.
"It's Latin," said Morgan. "It means, So there you bastard."
--Robert Rankin, _Nostramadus Ate My Hamster_

>-----Original Message-----
>From: Graham Chiu [mailto:anon_emouse@hotmail.com]
>Sent: 26. juli 1999 07:05
>To: zope@zope.org
>Subject: Re: [Zope] using sequence variables
>
>
>In article <379BC2E6.9820CBFB@leftfieldcorp.com>, Robert Leftwich
><robert@leftfieldcorp.com> writes
>>Try <!--#call
>>"REQUEST.set('m_localsearch',_.string.join(m_searchstring,' '))"-->
>>
>>Robert Leftwich
>
>Thanks, worked a treat.  I am a little curious though as to why I
>couldn't use the sequence-item.
>
>-------
>Regards,        Graham Chiu
>gchiu<at>compkarori.co.nz
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://www.zope.org/mailman/listinfo/zope
>
>(To receive general Zope announcements, see:
>http://www.zope.org/mailman/listinfo/zope-announce
>
>For developer-specific issues, zope-dev@zope.org -
>http://www.zope.org/mailman/listinfo/zope-dev )
>