Re: [Zope] stupid question I guess
josh on wrote: can I set a local variable in zope on a dtml page dtml-var variablename = 1 Yup: dtml-call "REQUEST.set('variablename',1)" Nice syntax, huh? ;-) Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] stupid question I guess
+[ Chris Withers ]- | josh on wrote: | can I set a local variable in zope on a dtml page | dtml-var variablename = 1 | | Yup: | | dtml-call "REQUEST.set('variablename',1)" | | Nice syntax, huh? ;-) Tsk tsk, that's global :-) dtml-let variablename=1 ... ... /dtml-let -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] stupid question I guess
Is it global to the page, or local to the page ?!?!? - Original Message - From: "Andrew Kenneth Milton" [EMAIL PROTECTED] To: "Chris Withers" [EMAIL PROTECTED] Cc: "josh on" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, June 07, 2000 3:05 PM Subject: Re: [Zope] stupid question I guess +[ Chris Withers ]- | josh on wrote: | can I set a local variable in zope on a dtml page | dtml-var variablename = 1 | | Yup: | | dtml-call "REQUEST.set('variablename',1)" | | Nice syntax, huh? ;-) Tsk tsk, that's global :-) dtml-let variablename=1 ... ... /dtml-let -- Totally Holistic Enterprises Internet| P:+61 7 3870 0066 | Andrew Milton The Internet (Aust) Pty Ltd | F:+61 7 3870 4477 | ACN: 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068|[EMAIL PROTECTED]| ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] stupid question I guess
At 12:05 am +1000 8/6/00, Andrew Kenneth Milton wrote: +[ Chris Withers ]- | josh on wrote: | can I set a local variable in zope on a dtml page | dtml-var variablename = 1 | | Yup: | | dtml-call "REQUEST.set('variablename',1)" | | Nice syntax, huh? ;-) Tsk tsk, that's global :-) dtml-let variablename=1 ... ... /dtml-let Tsk tsk tsk - it don't work ;) dtml-let variablename="1" ... ... /dtml-let tone.. -- Dr Tony McDonald, FMCC, Networked Learning Environments Project http://nle.ncl.ac.uk/ The Medical School, Newcastle University Tel: +44 191 222 5888 Fingerprint: 3450 876D FA41 B926 D3DD F8C3 F2D0 C3B9 8B38 18A2 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] stupid question I guess
wow great answer, thanks that has just peeled off another layer of zope mystery for me. can this be put in the dynamic faq? josh on - Original Message - From: Tony McDonald [EMAIL PROTECTED] To: Zope List [EMAIL PROTECTED] Sent: Wednesday, June 07, 2000 3:17 PM Subject: Re: [Zope] stupid question I guess At 2:55 pm +0100 7/6/00, Chris Withers wrote: josh on wrote: can I set a local variable in zope on a dtml page dtml-var variablename = 1 Yup: dtml-call "REQUEST.set('variablename',1)" Nice syntax, huh? ;-) Chris now now :) (tested) dtml-let variablename="1" blah blah blah ... ie the scope of the variable dtml-var variablename /dtml-let don't fall into the trap of doing this dtml-let variablename="I am a string" blah blah blah ... ie the scope of the variable dtml-var variablename /dtml-let 'cos Zope won't let you enter it (it thinks that the 'I' is a variable name). Remember that anything in " " is evaluated as a Python expression... try this instead dtml-let variablename="'I am a string'" blah blah blah ... ie the scope of the variable dtml-var variablename /dtml-let You can have multiple variables set too... dtml-let variablename="'I am a string'" bloot="1" blah blah blah ... ie the scope of the variable dtml-var variablename :: dtml-var bloot /dtml-let See lib/python/DocumentTemplate/DT_Let.py for more details... hth tone -- Dr Tony McDonald, FMCC, Networked Learning Environments Project http://nle.ncl.ac.uk/ The Medical School, Newcastle University Tel: +44 191 222 5888 Fingerprint: 3450 876D FA41 B926 D3DD F8C3 F2D0 C3B9 8B38 18A2 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )