nixon a écrit :
Hi, dear all,

The scenario:
I have a folder "MyFolder" created under the root folder of zope3 and make it a site manager. I want to have a different "index.html" page under MyFolder so that folders under MyFolder look different from the root folder. (It's a common folder and I dont want to make a specail type)

it seems easier to me to create an IMyFolder interface, implemented by MyFolder as a subclass of Folder (nothing more), then to register an index.html for IMyFolder.

I guess a local adapter may help.
While a local utility could be easily made by clicking "Registration" tab, I cannot find anything available for local adapter registration through the web.

I'm wondering how registering an adapter through the web would look like. I mean in a generic way. Adapters are classes and not persistent objects, so to be able to register an adapter TTW, it would require to choose a not-yet-zcml-registered class in a list, among those which can adapt the current object. But this kind of registration would not be specific to the current object, so it wouldn't make sense to do it in the registration tab of the current object.

But why not ?

I know the local adapter registration API:
e.g. "sm.registerAdapter(FileSize, [IFile])"
It seems to be invoked in runtime. But I don't know where to place it?
I think it should be invoked once during startup and should not be invoked everytime I use the adapter.

I've recently added a FAQ entry on how to do things once at startup:


Thank you!

雅虎邮箱传递新年祝福,个性贺卡送亲朋! <>


Zope3-users mailing list

Zope3-users mailing list

Reply via email to