[Zope] Re: [Zope-dev] getting request variables values
Dieter Maurer
dieter@handshake.de
Thu, 20 Jul 2000 23:54:49 +0200 (CEST)
Leonardo Kenji Shikida writes:
> How do I get HTTP headers and environment variables on Zope
> I know that <dtml-var REQUEST> shows me everything, but I only want to get 1
> specific variable.
If your variable is named NAME, you can use
<dtml-var NAME>
If there is a potential name clash and you want to be sure,
you get the NAME in REQUEST, you can use:
<dtml-with REQUEST>
<dtml-var NAME>
</dtml-with>
If you want an error, when REQUEST does not define NAME,
i.e. you do not want a NAME that comes from somewhere else,
you can use
<dtml-with REQUEST only>
<dtml-var NAME>
</dtml-with>
or <dtml-var "REQUEST[NAME]">.
Dieter