I am relatively new to zope. Thank you in advance for any help. here is my situation: user enters url zope maps url to object zope stitches together a frames html page according to my structure of inherited attributes. one of the html pages in the returned frameset needs to change itself depending on what type of object was asked for by the initial url request. I know I can get the initial requested url through the request object request = container.REQUEST and I know that all these objects have meta_type attributes. But how do I find a reference to the object to which zope has mapped the requested url that I can then test for its meta_type? I keep coming back to this bit of code in the page: fullpath = request.get('full') if not fullpath: fullpath = '0:%s' % url_quote(request.URL1) bookmarkid = context.db.get_link_id(fullpath) something related to the unique ID looks promising, but I have found no api that details the various methods available to call on the context or db objects. any help is appreciated. thank you.
This is not exactly a very "Zope-y" way of thinking about this problem. In Zope, you would probably have each type of object know how to generate that "html page returned in the frameset" all by itself, so Zope will map the URL to the object, hand the request to the object, and the object will generate the HTML that you want. HTH, John Ziniti Mark Anquoe wrote:
I am relatively new to zope. Thank you in advance for any help. here is my situation:
user enters url zope maps url to object zope stitches together a frames html page according to my structure of inherited attributes. one of the html pages in the returned frameset needs to change itself depending on what type of object was asked for by the initial url request.
I know I can get the initial requested url through the request object
request = container.REQUEST
and I know that all these objects have meta_type attributes. But how do I find a reference to the object to which zope has mapped the requested url that I can then test for its meta_type? I keep coming back to this bit of code in the page:
fullpath = request.get('full') if not fullpath: fullpath = '0:%s' % url_quote(request.URL1)
bookmarkid = context.db.get_link_id(fullpath)
something related to the unique ID looks promising, but I have found no api that details the various methods available to call on the context or db objects.
any help is appreciated.
thank you.
_______________________________________________ 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 )
I see what you're saying. If the site I'm working on wasn't frames based, then it would all make much more sense to me, zope-wise. If a folder is asked for directly and its index_html writes out a frameset that calls navbar_html and content_html, then when navbar_html is rendering itself, how is it supposed to know that a folder type object was originally asked for? John Ziniti wrote:
This is not exactly a very "Zope-y" way of thinking about this problem. In Zope, you would probably have each type of object know how to generate that "html page returned in the frameset" all by itself, so Zope will map the URL to the object, hand the request to the object, and the object will generate the HTML that you want.
HTH, John Ziniti
Mark Anquoe wrote:
I am relatively new to zope. Thank you in advance for any help. here is my situation:
user enters url zope maps url to object zope stitches together a frames html page according to my structure of inherited attributes. one of the html pages in the returned frameset needs to change itself depending on what type of object was asked for by the initial url request.
I know I can get the initial requested url through the request object
request = container.REQUEST
and I know that all these objects have meta_type attributes. But how do I find a reference to the object to which zope has mapped the requested url that I can then test for its meta_type? I keep coming back to this bit of code in the page:
fullpath = request.get('full') if not fullpath: fullpath = '0:%s' % url_quote(request.URL1)
bookmarkid = context.db.get_link_id(fullpath)
something related to the unique ID looks promising, but I have found no api that details the various methods available to call on the context or db objects.
any help is appreciated.
thank you.
_______________________________________________ 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 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 )
Mark Anquoe wrote at 2003-2-6 12:38 -0800:
... But how do I find a reference to the object to which zope has mapped the requested url that I can then test for its meta_type? The object is in "REQUEST.PUBLISHED".
Dieter
participants (3)
-
Dieter Maurer -
John Ziniti -
Mark Anquoe