[Zope3-dev] Changing the behavior of ++skin++ namespace

Jim Fulton jim at zope.com
Fri Aug 8 11:39:59 EDT 2003


Sidnei da Silva wrote:
> On Fri, Aug 08, 2003 at 09:52:45AM -0400, Jim Fulton wrote:
> | 
> | You can set the skin for a request bu including a path element of the form
> | 
> |   ++skin++somename
> | 
> | in a URL.  Currently, this is allowed to be anywhere in the path part of the
> | URL. I'm going to change the support for this so that this element must 
> | come at
> | the beginning of a path.  That is, you'll be able to use something like:
> | 
> |   http://foo.com/++skin++ZopeTop/a/b
> | 
> | but not:
> | 
> |   http://foo.com/a/++skin++ZopeTop/b
> | 
> | If anyone has a problem with this, let me  know ASAP.
> | 
> | (For those of you familiar with the innter workings of this, I'm
> |  getting rid of the whole "side-effect-names" business.  This is
> |  in preparation for containergeddon, where we place much less
> |  reliance on context wrappers.)
> | 
> | Among other things, this change will make the tree browser work properly
> | with ++skin++.
> 
> I wonder if that has any effect on virtual hosting contexts.

Good question.

I should say that it will be allowed after a virtual host specification.

For example, it will be OK to do something like:

     http://foo.com/x/y/++vh++http:spam.com/++skin++ZopeTop/a/b

Note that the skin specification comes at the beginning of a the
virtual path.

Also note that virtual hosts can be used to hide the skin specification.
For example, assuming that the server rewrote:

   http://spam.com/whatever.....

to:

   http://foo.com/++skin++spam/++vh++http:spam.com/whatever.....

then you would be arranging for the spam.com virtual host to use the
spam skin, without the ++skin++ business showing up in the part of the url that
people saw.

Jim

P.S. A nice little project for someone would be to add basic URL rewriting
      to the server so that we could do this sort of virtual hosting with
      zope alone. I imagine that the rewrite rules would be provided via
      ZConfig directives.

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (703) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org




More information about the Zope3-dev mailing list