On 10.05.2007, at 12:14, Thierry Florac wrote:
Hi,
I'm building a new application with Zope3.
In this application, I can use several skins :
- for all back-office and management pages, a single skin is used ;
it's defined via an Apache rewrite rule on a specific virtual host
- for front-office pages, the applied skin can be chosen by each
subsite administrator between a set of skins made available to him.
My idea is to use the IBeforeTraverseEvent on the site container,
and to apply the selected skin when I'm on a front-office page.
So my question is simple : can I know easilly (without hardcoding
virtual hosts, in fact) if I'm on a back-office page or not and, in
fact, if a specific skin has already been applied ?
hm, one solution would be to store the skin name chosen in the
session, and then look it up or set it in the traverser
to look if a skin is applied you just have to test if the request
implements your layer
if IMyLayerInterface.providedBy(request)
regards, bernd
Thanks for any help,
Thierry Florac
--
Chef de projet intranet/internet
Office National des Forêts - Département Informatique
2, Avenue de Saint-Mandé
75570 PARIS Cedex 12
Mél : [EMAIL PROTECTED]
Tél. : +33 01.40.19.59.64
Fax. : +33 01.40.19.59.85
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users