Em Ter, 2004-09-21 ās 12:17, Royce escreveu: > Was hoping to hear of a way to insert a VHM into my zpublisher app > object tree or something. Could just hack in hardwired cleanup for URL > and BASE but that seems ugly.
The code in VHM is really not that complicated. I recommend you read it so that you understand how to change your application to emulate or integrate it. Basically it hooks itself up into __bobo_traverse__ so that it gets called when the request comes in, before all objects in the path (after the root) are looked up. When called, VHM alters the request information (server and path, and as a consequence BASE* and URL*) which has the consequence of changing what objects are looked up to handle the request (i.e. no need for objects called VirtualHostBase or VirtualHostRoot). This is done thru Request methods that where created exactly for this purpose: .setServerURL() and .setVirtualRoot() Documentation for those can be found in the Zope Online Help and other places. Cheers, Leo -- Leonardo Rochael Almeida <[EMAIL PROTECTED]> _______________________________________________ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )