7 Feb
2001
7 Feb
'01
9:45 a.m.
"Farrell, Troy" wrote:
Can someone tell me how to do the equivalent of <dtml-var "_.getitem(REQUEST['variablenameinastring'])"> in PythonScript
Go to the bindings tab and bind the namespace to _. (Not sure why this wasn't done by default :-S) Then just do: _.getitem(context.REQUEST['variablenameinastring']) I wonder why REQUEST isn't one of the things you can bind. Or RESPONSE for that matter :-S cheers, Chris PS: answer to own question: put REQUEST and RESPONSE in the parameter list :-) (If you do that, you don't need to 'context.' before the REQUEST above...)