[Zope3-Users] Making site skins

Johan Carlsson johanc at easypublisher.com
Wed Aug 17 03:48:54 EDT 2005


Dominik Huber wrote:
> Johan Carlsson wrote:
> 
>>
>> Ok, so far I figured out the following:
>>
>> 1. Resources gets registered as adapters in the Global Site Manager.
>> 2. The adapter is registerd to adapt from the current layer interface 
>> (defaults to IDefaultBrowserLayer) to the Interface interface 
>> (strange, why is that so I wounder?)
> 
> 
> The browser request gets directly marked by a skin interface.This is 
> done by the http publication request factory:
> (zope.app.publication.httpfactory.HTTPPublicationRequestFactory -> 
> zope.app.publication.browser.setDefaultSkin)
> 
> Afterward the specific adapters such as views get invoked, because you 
> register those to a dedicated request interface using the layer 
> attribute. Attention they get looked up via the regular default-adapter 
> mechansim and not as named adapters.
> 
> IMO you can register only a specific IDefaultSkin adapter to a site 
> marked for example as ISkinableSite:
> 
> <adapter
>    for='.ISkinableSite'
>    provides='.IDefaultSkin'
>    factory='.adapter_that_offers_a_skin_interface_selected_by_the_user' />
> 
> Within this adapter you can invoke the user preferences or something else.

Thanks for the input Dominik.
I think this is just the info I wanted.

Now I just need to understand it as well :-)




-- 
Johan Carlsson          Tel: + 46 8 31 24 94
Colliberty              Mob: + 46 70 558 25 24
Torsgatan 72            Email: johanc at easypublisher.com
SE-113 37 STOCKHOLM



More information about the Zope3-users mailing list