Re: [Zope-dev] variables in zope (beginner question)
On Mon, 11 Mar 2002, Mike Guerrero wrote: I the code below I want to be declare a variable 'tot_net_amt' and add 'net_amt' to it for each record returned. How can I: 1) declare the variable 2) add to it within the loop. Thanks. Is it in the Zope book? I'll read some more tonight. This question is much more suitable for the 'zope' mailing list rather than 'zope-dev'. The short answer is (a) download the 'dtml-set' product and use it or (b) dtml-call REQUEST.set('yourvar',value) The long answer is: think about using pythonscripts instead grin. --RDM ___ 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] variables in zope (beginner question)
Hello, I the code below I want to be declare a variable 'tot_net_amt' and add 'net_amt' to it for each record returned. How can I: 1) declare the variable 2) add to it within the loop. Thanks. Is it in the Zope book? I'll read some more tonight. Thanks for your help. Mike dtml-var standard_html_header h3Current Month/h3 !-- declare tot_net_amt int := 0; --- table border=1 cellspacing=0 tr thfont size=1Sales Order No./font/th thfont size=1Net Amt./font/th /tr dtml-in sql_curr_month_decom tr !--- net_tot_amt := net_tot_amt + dtml-var net_amt --- td align=centerfont size=1dtml-var sales_ord_no/font/td td align=centerfont size=1dtml-var net_amt/font/td /tr /dtml-in /table dtml-var standard_html_footer ___ 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 )