Hi all ! i am having a problem with dtml-with tag the problem is: i want to do a <dtml-with "PARENTS[0].location.place"> the problem is that instead of writing PARENTS[0].location.place i want to use a variable that is a built string: <dtml-call "REQUEST.set('location', 'PARENTS[0].location.' + dir)"> dir is a dtml-var which has the string place ! and then use something like: <dtml-with "_[location]"> does someone knows how to do this ?? I have tried tips in zope.org but unsucessfuly here's the zope error: Error Type: KeyError Error Value: PARENTS[0].location.place thank you all Nuno
How about PARENTS[0].location[dir] ----- Original Message ----- From: "nuno" <nuno@fccn.pt> To: <zope@zope.org> Sent: Wednesday, March 21, 2001 4:48 PM Subject: [Zope] dtml-with string
Hi all !
i am having a problem with dtml-with tag the problem is:
i want to do a <dtml-with "PARENTS[0].location.place">
the problem is that instead of writing PARENTS[0].location.place i want to use a variable that is a built string:
<dtml-call "REQUEST.set('location', 'PARENTS[0].location.' + dir)">
dir is a dtml-var which has the string place ! and then use something like: <dtml-with "_[location]">
does someone knows how to do this ?? I have tried tips in zope.org but unsucessfuly
here's the zope error:
Error Type: KeyError Error Value: PARENTS[0].location.place
thank you all
Nuno
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Nope ! even if the string has the real path: str='PARENTS[0].location.place' it doesn't work the use of <dtml-with "_[str]"> thanks ----- Original Message ----- From: "Phil Harris" <phil.harris@zope.co.uk> To: "nuno" <nuno@fccn.pt>; <zope@zope.org> Sent: Wednesday, March 21, 2001 4:56 PM Subject: Re: [Zope] dtml-with string
How about
PARENTS[0].location[dir]
----- Original Message ----- From: "nuno" <nuno@fccn.pt> To: <zope@zope.org> Sent: Wednesday, March 21, 2001 4:48 PM Subject: [Zope] dtml-with string
Hi all !
i am having a problem with dtml-with tag the problem is:
i want to do a <dtml-with "PARENTS[0].location.place">
the problem is that instead of writing PARENTS[0].location.place i want to use a variable that is a built string:
<dtml-call "REQUEST.set('location', 'PARENTS[0].location.' + dir)">
dir is a dtml-var which has the string place ! and then use something like: <dtml-with "_[location]">
does someone knows how to do this ?? I have tried tips in zope.org but unsucessfuly
here's the zope error:
Error Type: KeyError Error Value: PARENTS[0].location.place
thank you all
Nuno
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Hi, I dont think that your technique of providing a string in the dtml-with tag will ever materialise. Dieter had earlier written a mail in the mailing list,saying that you can't use strings with the dtml-with tag.He had hinted at a usage of restricted traverse giving the path as an argument. The problem obviously is happening with your call, PARENTS[0].location.place which is not getting evaluated to the correct value. PARENTS[0] should evaluate to the current folder,and as your argument to dtml-with happens to be a string,the key is taken to be, PARENTS[0].location.place without evaluation. I am not sure about this as I am not able to test it now, but if you have a _.eval benefit in dtml-with,then try evaluating the string,and then do a dtml-with or else you have to resort to python power to accomplish your task. Bye, A.R.K
Nope !
even if the string has the real path: str='PARENTS[0].location.place' it doesn't work the use of <dtml-with "_[str]">
thanks
----- Original Message ----- From: "Phil Harris" <phil.harris@zope.co.uk> To: "nuno" <nuno@fccn.pt>; <zope@zope.org> Sent: Wednesday, March 21, 2001 4:56 PM Subject: Re: [Zope] dtml-with string
How about
PARENTS[0].location[dir]
----- Original Message ----- From: "nuno" <nuno@fccn.pt> To: <zope@zope.org> Sent: Wednesday, March 21, 2001 4:48 PM Subject: [Zope] dtml-with string
Hi all !
i am having a problem with dtml-with tag the problem is:
i want to do a <dtml-with "PARENTS[0].location.place">
the problem is that instead of writing PARENTS[0].location.place i want to use a variable that is a built string:
<dtml-call "REQUEST.set('location', 'PARENTS[0].location.' + dir)">
dir is a dtml-var which has the string place ! and then use something like: <dtml-with "_[location]">
does someone knows how to do this ?? I have tried tips in zope.org but unsucessfuly
here's the zope error:
Error Type: KeyError Error Value: PARENTS[0].location.place
thank you all
Nuno
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- Windows Sucks!!Linux Rules!!!.
nuno wrote:
Nope !
even if the string has the real path: str='PARENTS[0].location.place' it doesn't work the use of <dtml-with "_[str]">
thanks
Didn't we just answer this yesterday? The list archives are a VERY good, fast resource: Try: <dtml-with "_.getitem(str)"> -- Tim Cook, President - FreePM,Inc. http://www.FreePM.com Office: (901) 884-4126 ONLINE DEMO: http://www.freepm.org:8080/FreePM
it doesn't work also !! I saw that post ! The problem is the string "PARENTS[0].xpto.xpto2" I had read a mail that the solution is to work with paths like dir/dir1/dir2/ then i solved the problem with REQUEST.resolve_url thank you all PS: i had tried both ways _.getitem(str) and _[str] ! ----- Original Message ----- From: "Tim Cook" <tim@freepm.org> To: "nuno" <nuno@fccn.pt> Cc: "Phil Harris" <phil.harris@zope.co.uk>; <zope@zope.org> Sent: Wednesday, March 21, 2001 7:52 PM Subject: Re: [Zope] dtml-with string
nuno wrote:
Nope !
even if the string has the real path: str='PARENTS[0].location.place' it doesn't work the use of <dtml-with "_[str]">
thanks
Didn't we just answer this yesterday? The list archives are a VERY good, fast resource:
Try: <dtml-with "_.getitem(str)">
-- Tim Cook, President - FreePM,Inc. http://www.FreePM.com Office: (901) 884-4126 ONLINE DEMO: http://www.freepm.org:8080/FreePM
nuno wrote:
it doesn't work also !! I saw that post ! The problem is the string "PARENTS[0].xpto.xpto2"
<dtml-with "PARENTS[0]"> <dtml-with xpto> <dtml-with xpto2> ... do stuf here ... </dtml-with> </dtml-with> </dtml-with> Any help? cheers, Chris
The problem is the string "PARENTS[0].xpto.xpto2"
<dtml-with "PARENTS[0]"> <dtml-with xpto> <dtml-with xpto2> ... do stuf here ... </dtml-with> </dtml-with> </dtml-with>
Isn't that exactly the same as <dtml-with "PARENTS[0].xpto.xpt02"> </dtml-with> ??
Peter Bengtsson wrote:
The problem is the string "PARENTS[0].xpto.xpto2"
<dtml-with "PARENTS[0]"> <dtml-with xpto> <dtml-with xpto2> ... do stuf here ... </dtml-with> </dtml-with> </dtml-with>
Isn't that exactly the same as <dtml-with "PARENTS[0].xpto.xpt02"> </dtml-with>
Nope... that's equivalent to:
<dtml-with "PARENTS[0]"> <dtml-with xpto> <dtml-with xpto2 only> ... do stuf here ... </dtml-with> </dtml-with> </dtml-with>
Tim Cook wrote:
Didn't we just answer this yesterday? The list archives are a VERY good, fast resource:
Ooops! Sorry. Wasn't paying attention. I'll shutup now. -- Tim Cook, President - FreePM,Inc. http://www.FreePM.com Office: (901) 884-4126 ONLINE DEMO: http://www.freepm.org:8080/FreePM
participants (6)
-
Chris Withers -
karthick ramanarayanan -
nuno -
Peter Bengtsson -
Phil Harris -
Tim Cook