[z3-five] Question about skins usage

Philipp von Weitershausen philipp at weitershausen.de
Tue Jul 25 14:12:28 CEST 2006


Maciej Wiśniowski wrote:
> 
>>> 1. by writing ++skin++Skintest/ in url
>>> 2. by defining my skin as defaultSkin with overrides.zcml
>>>   
>>
>> 3. wherever you want you can attach a skin to the request, e.g. during
>> traversal somewhere.
>>  
>>
> What do you mean by attaching skin to the request? Isn't it point 1?

Point 1 is just one spelling of changing a skin during traversal; it
could also be "invisible", e.g:

  www.car-shop.com           # default skin used
  www.car-shop.com/usedcars  # different skin because different shop

In this case, a traversal hook in "usedcars" changed the skin.

>> Why do you need this at all? What's your use case? Let's start there and
>> see if several skins are actually necessary.
>>  
>>
> I'm just wondering about. My use case is that I'll have several
> applications and much more products in one Zope instance.

Let's drop the term "products", I never get the right kind of
connotation when it's used.

So, you have several applications in a Zope instance. That's indeed a
use case for having different skins. Each application probably wants its
own skin.

The question is, how will these different applications be reachable?
Will they get different domains? Then you can use rewrite rules:

  www.car-shop.com  ->  http://localhost:8080/++skin++CarShop/carshop
  www.usedcars.com  ->  http://localhost:8080/++skin++UsedCars/usedcars

If they are part of the same domain, use traversal hooks as described
above (www.car-shop.com vs. www.car-shop.com/usecars).

Philipp



More information about the z3-five mailing list