[Zope] ZPT / TALES question

AJ Coon aj@hostway.com
Fri, 20 Dec 2002 12:09:42 -0600


TALES uses the 'options' variable to store the dictionary of key/value 
pairs passed into a ZPTemplate when it gets parsed.  My question is: 
 What 'is' options?  Obviously, it is some sort of dictionary, but what 
does it inherit from, etc.?

The reason I ask is I 'bumped into' a method of options accidentally. 
 In one of my templates I used the following syntax:

<input type="hidden" name="copy" value="" tal:attributes="value 
options/copy">

I had passed a variable named 'copy' into the options dictionary with my 
own value, and wanted it to persist across the form submission, hence 
the hidden input field.  What happened though is when my form was 
submitted, the action script read in copy as this HUGE dictionary, and 
after further investigation, I realized its contents were the same as 
the options that I passed into the Template.  So options/copy appears to 
create a copy OF options.   How's that for confusing!

Obviously, I will change the name of my variable to something else. 
 Just wondering what 'else' I should avoid!

Thanks,

aj