Submitted by : Martijn Pieters at: 2005-03-11T07:17:27+00:00 (12 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

Currently ZWiki plugins are included as base classes of ZWikiPage at the end of the list; this way their methods are last to be looked up and core ZWiki class methods have precedence.

However, I have found that I need to adjust the behaviour of core methods (such as what gets mailed when a comment is added to a Page).

Could one of the following be implemented:

  • Large-scale refactoring to an event driven architecture so one can reroute events to adjust the behaviour. So for example, adding a comment would fire a CommentAdded? event, and I can disable the normal CommentMail? event action and replace it with my own.
  • Allow the registration of overriding plugin classes; these would be included at the top of the base class hierarchy. Should be an easy hack once #1034 Pluginization has been solved. You can then register your plugin as 'overriding' and it's methods take precedence over the existing core classes.

I'd favour solution #1 but I realize that the current codebase isn't set up for such Zope3-ish modular behaviour just yet.