Hi All, I can't get <dtml-with PARENTS[1]> to work. I want it reference the folder containing the folder containing the document, but i get: Error Type: KeyError Error Value: PARENTS[1] Thanks. Tom Scheidt | www.falsemirror.com | tom@falsemirror.com ---------------------------------------------------------------------------- -----------
Bill Anderson wrote:
Tom Scheidt wrote:
Hi All,
I can't get
<dtml-with PARENTS[1]>
Have you tried <dtml-with "PARENTS[1]"> ? I dont recall why ATM, but my rule-of-thumb is that if you are calling ALLCAPS (ie. REQUEST,PARENTS...) wrap it in quotes.
The all-caps things isn't the problem, <dtml-var REQUEST> will work fine :-) The problem is the [1] which is a python way of saying give me the 1st element in the list object called PARENTS. It being python, it need to be wrapped in " ";-) cheers, Chris
Chris Withers wrote:
Bill Anderson wrote:
Tom Scheidt wrote:
Hi All,
I can't get
<dtml-with PARENTS[1]>
Have you tried <dtml-with "PARENTS[1]"> ? I dont recall why ATM, but my rule-of-thumb is that if you are calling ALLCAPS (ie. REQUEST,PARENTS...) wrap it in quotes.
The all-caps things isn't the problem, <dtml-var REQUEST> will work fine :-)
Yeah, I recalled why I made that rule of thumb being python related in a private email to Tom. Guess I forgot to Cc the list. :) I don't think I've ever used PARENTS or REQUEST alone (except for the occasional debugging with REQUEST), so I always wind up needing to call them the pythonic way.
participants (3)
-
Bill Anderson -
Chris Withers -
Tom Scheidt