Re: [Zope] Acquisition? problem

2006-08-15 Thread Hans Then
Hi Jonathan,

> if you have a python script in the middle of your path, eg:
> folder/pythonscript/somethingelse
> then the pythonscript routine will get executed and 'somethingelse' will
be
> passed in a variable called 'traverse_subpath'
> Create a test python script and try it out (look for traverse_subpath in
the
> REQUEST namespace)
>
What if I don't want that? I can, for instance, call
/folder/pythonscript/title_or_id
/folder/pythonscript/manage_workspace

There the behaviour you describe does not occur.

Regards,

Hans Then

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Acquisition? problem

2006-06-30 Thread Jonathan


- Original Message - 
From: "Hans Then" <[EMAIL PROTECTED]>

if you have a python script in the middle of your path, eg:
folder/pythonscript/somethingelse
then the pythonscript routine will get executed and 'somethingelse' will

be

passed in a variable called 'traverse_subpath'
Create a test python script and try it out (look for traverse_subpath in

the

REQUEST namespace)


What if I don't want that? I can, for instance, call
/folder/pythonscript/title_or_id
/folder/pythonscript/manage_workspace


If you want to be sure about the behaviour of your display template I would 
change the URL to something like:


folder/displayroutine?id=objectid

and have displayroutine (a script or method) access the object via the 
parameter id ad generate the appropriate display (based on the type of 
object it is given). This way you are not going to run into differences in 
aquisition handling for different types of objects that you are trying to 
display.



Jonathan 


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Acquisition? problem

2006-06-30 Thread Jonathan


- Original Message - 
From: "Hans Then" <[EMAIL PROTECTED]>

I am writing a small object browser for the EPOZ toolbox. In the browser I
have a tree of object references. Clicking on the tree should show more
details of the selected object. I have created a template details that
should show the details of the object, like this:

/folder/selected_object/details

This is all TTW code by the way. The template works fine for most values 
of
selected_object, but for some it fails. It fails for at least 
PageTemplates

and Python Scripts. For those objects, calling the details template will
simply show the normal output of the object.


if you have a python script in the middle of your path, eg:

folder/pythonscript/somethingelse

then the pythonscript routine will get executed and 'somethingelse' will be 
passed in a variable called 'traverse_subpath'


Create a test python script and try it out (look for traverse_subpath in the 
REQUEST namespace)




Jonathan 


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Acquisition? problem

2006-06-30 Thread Hans Then
Hi all,

I am writing a small object browser for the EPOZ toolbox. In the browser I
have a tree of object references. Clicking on the tree should show more
details of the selected object. I have created a template details that
should show the details of the object, like this:

/folder/selected_object/details

This is all TTW code by the way. The template works fine for most values of
selected_object, but for some it fails. It fails for at least PageTemplates
and Python Scripts. For those objects, calling the details template will
simply show the normal output of the object.

Any ideas on how to solve this?

Regards,

Hans Then

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )