[Zope-dev] Building custom DTML tags and accessing _.something
Hia guys, I was wondering if any of you could give me a couple of hints about how to make the _.{random,string,range,Datetime} thingies from a tag expression. I.e. instead of doing this: dtml-widget select options=[1,2,3,4,5,6,7,8,9,10,11,12,13] selected=[1,3,5,7,9,11,13 This could be done: dtml-widget select options=_.range(1,14,1) selected=_.range(1,14,2) Like this (with the DTML var tag): dtml-var [1,2,3,4,5,6,7,8,9,10] dtml-var _.range(1,11) Thanks cheers, Morten ___ 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 )
Re: [Zope-dev] Building custom DTML tags and accessing _.something
I find this useful: How to write your own DTML tag http://www.zope.org/Members/z113/1 Cheers. -- Andy McKay. - Original Message - From: Morten W. Petersen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 7:53 AM Subject: [Zope-dev] Building custom DTML tags and accessing _.something Hia guys, I was wondering if any of you could give me a couple of hints about how to make the _.{random,string,range,Datetime} thingies from a tag expression. I.e. instead of doing this: dtml-widget select options=[1,2,3,4,5,6,7,8,9,10,11,12,13] selected=[1,3,5,7,9,11,13 This could be done: dtml-widget select options=_.range(1,14,1) selected=_.range(1,14,2) Like this (with the DTML var tag): dtml-var [1,2,3,4,5,6,7,8,9,10] dtml-var _.range(1,11) Thanks cheers, Morten ___ 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 ) ___ 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 )
Re: [Zope-dev] Building custom DTML tags and accessing _.something
Morten W. Petersen writes: ... evaluated attribute values in custom DTML tags -- how? ... Look as one of the *_expr parameters in e.g. Products.MIMETools.MIMETag. They do what you want and you can see, how it is implemented. Dieter ___ 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 )