using sequence variables
Hi, I would like to take a list of words, and remove all the parens, commas so that it becomes space separated. I tried this: <!--#call "REQUEST.set('m_localsearch','')"--> value: <!--#var m_searchstring--> and this shows the list correctly <!--#in m_searchstring--> Sequence: <!--#var sequence-item--> and this shows each element of the list <!--#call "REQUEST.set('m_localsearch',m_localsearch+' '+sequence-item)"--> <!--#/in--> but it dies on the last REQUEST.set ------- Regards, Graham Chiu gchiu<at>compkarori.co.nz
Try <!--#call "REQUEST.set('m_localsearch',_.string.join(m_searchstring,' '))"--> Robert Leftwich Graham Chiu wrote:
Hi,
I would like to take a list of words, and remove all the parens, commas so that it becomes space separated.
I tried this:
<!--#call "REQUEST.set('m_localsearch','')"-->
value: <!--#var m_searchstring--> and this shows the list correctly
<!--#in m_searchstring--> Sequence: <!--#var sequence-item--> and this shows each element of the list <!--#call "REQUEST.set('m_localsearch',m_localsearch+' '+sequence-item)"--> <!--#/in-->
but it dies on the last REQUEST.set
------- 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 )
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
participants (2)
-
Graham Chiu -
Robert Leftwich