Hello!! Could somebody tell me if this would work? How should I do to make it work? <dtml-call "REQUEST.set ('path_dir','http://medsaude.lab.bsi.com.br/especialidade')"> <dtml-with path_dir> <dtml-call expr="manage_addFolder( id=pasta, title=titulo)"> </dtml-with> Thanks! ________________________________________________ Don't E-Mail, ZipMail! http://www.zipmail.com/
----- Original Message ----- From: "After Dark" <afterz@zipmail.com> To: <zope@zope.org> Sent: Wednesday, April 04, 2001 2:35 PM Subject: [Zope] path...
Hello!!
Could somebody tell me if this would work? How should I do to make it work?
<dtml-call "REQUEST.set ('path_dir','http://medsaude.lab.bsi.com.br/especialidade')"> <dtml-with path_dir> <dtml-call expr="manage_addFolder( id=pasta, title=titulo)"> </dtml-with>
No, this won't work Try something like this (untested): <dtml-with expr="PARENTS[0].restrictedTraverse('especialidade')"> <dtml-call expr="manage_addFolder(id='pasta',title='titulo')"> </dtml-with> You really should read some of the HowTo's, Zope Books, and the mailing list (this question was answered a couple of weeks ago). Also, check out Dieter's book: http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html Andrew
After Dark wrote:
Hello!!
Could somebody tell me if this would work? How should I do to make it work?
<dtml-call "REQUEST.set ('path_dir','http://medsaude.lab.bsi.com.br/especialidade')"> <dtml-with path_dir> <dtml-call expr="manage_addFolder( id=pasta, title=titulo)"> </dtml-with>
Thanks!
Assuming this is an object on your site you could use: <dtml-with expr="REQUEST.resolve_url('/especialidade')"> <dtml-call expr="manage_addFolder( id=pasta, title=titulo)"> </dtml-with> -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
Hi, I tryed but didn`t work... Well, I know that like this works: <dtml-with "MedSaude.sintoma"> But if I make like this doesn`t: <dtml-call "REQUEST.set('base','Medsaude.sintoma')"> <dtml-with "base"> Why?? I have to make it work... Bye. On Wed, 04 Apr 2001 14:37:13 -0600 Casey Duncan <cduncan@kaivo.com> wrote:
After Dark wrote:
Hello!!
Could somebody tell me if this would work? How should I
do
to make it work?
<dtml-call "REQUEST.set ('path_dir','http://medsaude.lab.bsi.com.br/especialidade')"> <dtml-with path_dir> <dtml-call expr="manage_addFolder( id=pasta, title=titulo)"> </dtml-with>
Thanks!
Assuming this is an object on your site you could use:
<dtml-with expr="REQUEST.resolve_url('/especialidade')"> <dtml-call expr="manage_addFolder( id=pasta, title=titulo)"> </dtml-with>
-- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
________________________________________________ Don't E-Mail, ZipMail! http://www.zipmail.com/
After Dark wrote:
Hi, I tryed but didn`t work...
Well, I know that like this works: <dtml-with "MedSaude.sintoma">
But if I make like this doesn`t: <dtml-call "REQUEST.set('base','Medsaude.sintoma')"> <dtml-with "base">
Why?? I have to make it work...
Bye.
In your REQUEST.set statement, you are setting base to the string 'Medsaude.sintoma'. Doing dtml-with on a string value will do you little good. try: <dtml-call expr="REQUEST.set('base', Medsaude.sintoma)"> If your object name is being passed as a string try: <dtml-call expr="REQUEST.set('base', _.getitem(objectName))"> hth, -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
What you said makes very much sense, I liked that. :) But.... I tryed this and didn`t work again. :~( <dtml-call "REQUEST.set('base',_.getitem('MedSaude.sintoma'))"> <dtml-with base> Error: trying to reference a nonexisting.... It seems to me that nothing works.. :~~( Help!! Bye. On Thu, 05 Apr 2001 09:17:30 -0600 Casey Duncan <cduncan@kaivo.com> wrote:
After Dark wrote:
Hi, I tryed but didn`t work...
Well, I know that like this works: <dtml-with "MedSaude.sintoma">
But if I make like this doesn`t: <dtml-call "REQUEST.set('base','Medsaude.sintoma')"> <dtml-with "base">
Why?? I have to make it work...
Bye.
In your REQUEST.set statement, you are setting base to the string 'Medsaude.sintoma'. Doing dtml-with on a string value will do you little good.
try: <dtml-call expr="REQUEST.set('base', Medsaude.sintoma)">
If your object name is being passed as a string try:
<dtml-call expr="REQUEST.set('base', _.getitem(objectName))">
hth, -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
________________________________________________ Don't E-Mail, ZipMail! http://www.zipmail.com/
After Dark wrote:
What you said makes very much sense, I liked that. :) But....
I tryed this and didn`t work again. :~(
<dtml-call "REQUEST.set('base',_.getitem('MedSaude.sintoma'))"> <dtml-with base>
Error: trying to reference a nonexisting....
It seems to me that nothing works.. :~~( Help!!
Bye.
You can only pass the name of a single object to getitem. If you wish to pass the parent object, you need to do two separate getitems like: <dtml-with expr="_.getitem('MedSaude')"> <dtml-call "REQUEST.set('base',_.getitem('sintoma'))"> </dtml-with> If I may, what is the reason for this arbitrary object retrieval? I sense there is an easier way to accomplish what you need with jumping through these hoops. -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>
participants (3)
-
After Dark -
Andrew Williams -
Casey Duncan