[Zope-CMF] Lost in SkinSpace!

Jon Edwards jon@pcgs.freeserve.co.uk
Mon, 1 Jul 2002 17:44:51 +0100


> You could use an AccessRule on each subfolder which just did the
> 'REQUEST.set' as the folder was traversed;  much nicer than subclassing,
> IMNSHO :)

AccessRules scare me slightly :-) so just to check I'm understanding, should
I -

1. Add a PythonScript in "portal_skins/custom" (so that it's always
available from any skin), called, say, "setlocalskin" that contains -

    REQUEST=context.REQUEST
    sk_choice=context.skin_choice
    if not REQUEST.haskey(portal_skin);
        REQUEST.set(portal_skin, sk_choice)

2. Subclass/hotfix PortalFolder (I've already done that for other reasons),
and add in the manage_afterAdd section -

    manage_addAccessRule(self, method_id="setlocalskin")

- and add an AccessRule with the same method_id manually to any folders I've
already created?

Thanks for the help!

(Thanks for the Apache selection Kevin, but I'm sometimes going to be
installing the product on intranets where Apache isn't used)

Cheers, Jon