You've just seen how to push existing objects to the top of the namespace. But what if you want to create a new DTML object or variable? How do you push that newly-minted variable in to the DTML namespace?
The <dtml-let> tag is designed for just this kind of thing. Here's an example:
<dtml-let me="'John Doe'" >
I am <dtml-var me>.
The output of the script is pretty obvious:
I am John Doe
The <dtml-let> tag has been used to push a new variable, "me", to the top
of the namespace. You can now access the value for this variable without even passing it as part of the query string. This is an effective way of debugging complicated DTML methods which require numerous parameters in the form data; just push them on to the namespace using the <dtml-let> tag, test your code, and, once you're done, delete the <dtml-let> tag!
You can also push objects on to the namespace. As an example, consider the process of pushing the GetUsers() ZSQL Method on to the namespace: