who did call index_html??
Is there a way to know who did call index_html ? I have a product that has a view option. If this option is used I want to have the "next" index_html to call a method on the object from which the call originated. thanks for your tips Robert
Pass along the object's physical path in a query string to the view method, e.g.: <a href="view?cameFrom=/foo/bar/fob"> this might look something like (untested): <a href="view?cameFrom=<dtml-var getPhysicalPath url_quote>> The resolve the "cameFrom" string into an object into an object using restrictedTraverse in the view method. Robert Rottermann wrote:
Is there a way to know who did call index_html ?
I have a product that has a view option. If this option is used I want to have the "next" index_html to call a method on the object from which the call originated.
thanks for your tips
Robert
_______________________________________________ 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 )
Thanks for your answer, here the final approach: <dtml-var "_[getPhysicalPath()[-1]].show()"> where show() is the method to call in the calling object. Robert ----- Original Message ----- From: "Chris McDonough" <chrism@zope.com> To: "Robert Rottermann" <robert@redcor.ch> Cc: <zope@zope.org> Sent: Wednesday, January 16, 2002 4:42 PM Subject: Re: [Zope] who did call index_html??
Pass along the object's physical path in a query string to the view method, e.g.:
<a href="view?cameFrom=/foo/bar/fob">
this might look something like (untested):
<a href="view?cameFrom=<dtml-var getPhysicalPath url_quote>>
The resolve the "cameFrom" string into an object into an object using restrictedTraverse in the view method.
Robert Rottermann wrote:
Is there a way to know who did call index_html ?
I have a product that has a view option. If this option is used I want to have the "next" index_html to call a method on the object from which the call originated.
thanks for your tips
Robert
_______________________________________________ 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 )
participants (2)
-
Chris McDonough -
Robert Rottermann