"Phillip J. Eby" wrote:
Just out of curiosity, did you find this out by reading the draft
SkinScript reference documentation on the ZPatterns Wiki?
No. I just guessed.
I think I might have read it in the source the other day too.
I'll take a look at the wiki now:
http://www.zope.org//Members/pje/Wikis/ZPatterns/SkinScriptSyntax
expression
A DTML-style Python expression. As with DTML, the "_"
object is available for access to Python built-ins and
library functions.
Aha!
I'm looking forward to using the new "OTHERWISE LET" clause too, when
the next release of ZPatterns comes out.
Thanks.
At 03:45 PM 10/4/00 +0100, Steve Alexander wrote:
I just found out that you can access all sorts of useful methods in
SkinScript from the magical "_" namespace variable.
Let's say I have a DataSkin that has a propertysheet "journey", which
has a "steps" property of type "lines". I can expose its "steps"
property as an attribute, and also a neatly formatted version of the
same, using this SkinScript:
WITH self.propertysheets.get('journey') COMPUTE
steps=getProperty('steps'),
steps_comma_sep=_.string.join(self.steps, ', ')
--
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 )