changing the behaviour of an object with another object
hello all! maybe this is an old issue but please forgive me, i am a newbie :) in Zope2.3.x for Linux (RH-7.1) is it possible to change the behaviour of an object with another object that comes after it, when you call it from a browser? for few examples: my folders: /web/articles/jane/art1_html /web/BOOKS/fiction_html /web/misc/print_view (print_view is a DTML_Method) www.mydomain.com:8080/web/articles/jane/art1_html (normal view) www.mydomain.com:8080/web/articles/jane/art1_html/print_view (print view) www.mydomain.com:8080/web/BOOKS/fiction_html/print_view (same "print_view" object in use for changing another objects view) www.mydomain.com:8080/web/BOOKS/fiction_html/fancy_view (other possible use) i appreciate any help. ismet
I believe this topic is covered in the Zope book, especially in this chapter: http://www.zope.org/Members/michel/ZB/ScriptingZope.dtml Eric Balasbas Senior Developer eric@virtosi.com http://www.virtosi.com/ Virtosi Ltd. Design -- Branding -- Zope On Tue, 26 Jun 2001, Ismet Dere wrote:
hello all!
maybe this is an old issue but please forgive me, i am a newbie :)
in Zope2.3.x for Linux (RH-7.1) is it possible to change the behaviour of an object with another object that comes after it, when you call it from a browser?
for few examples:
my folders: /web/articles/jane/art1_html /web/BOOKS/fiction_html /web/misc/print_view (print_view is a DTML_Method)
www.mydomain.com:8080/web/articles/jane/art1_html (normal view) www.mydomain.com:8080/web/articles/jane/art1_html/print_view (print view)
www.mydomain.com:8080/web/BOOKS/fiction_html/print_view (same "print_view" object in use for changing another objects view)
www.mydomain.com:8080/web/BOOKS/fiction_html/fancy_view (other possible use)
i appreciate any help. ismet
Ismet Dere writes:
is it possible to change the behaviour of an object with another object that comes after it, when you call it from a browser? In principle, it is possible. Whether it is feasible, depends on what you want to do.
If you want for example provide a different "standard_html_header", you could do: URL: _path_to_myobject/special_view with "special_view" containing the following code: <dtml-var special_html_header> <dtml-var "PARENTS[0](PARENTS[1],REQUEST,standard_html_header='')"> This will usually work if "myobject" is a DTML object. It renders a special header (which may be necessary for a print view) and then renders "myobject" in a way very similar to how ZPublisher would have done it. Of course, you can add further parameters to the call.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> Could you avoid HTML posting?
I have to manually delete it when you reply to your message... Dieter
participants (3)
-
Dieter Maurer -
Eric Balasbas -
Ismet Dere