This page is intended to be a discussion about extending the ZWikiPage class by subclassing it. This way one would be able to create specializations of ZWikiPage, such as a ZWikiBook containing properties like ISBN along with specific methods, such as looking up the book info in the Library of Congress using the ISBN identifier.

The point is... how can I implement a subclass of ZWikiPage and integrate it in a Zwiki? Is the following possible?:

class ZWikiBook(ZWikiPage):
   """Book object for ZWiki"""

   meta_type = 'ZWikiBook'

      {'id':'isbn', 'type': 'string', 'mode':'w'},
      + ZWikiPage._properties)

   def lookup_info(self):
      """Book info lookup method that uses the ISBN property"""

And if so, how can I integrate this class into ZWiki w/o monkey-patching?

Maybe, like it was pointed out in ZwikiRecordBook, we need a ZWikiAwareness? mixin class to create custom ZWiki objects that can be integrated into ZWiki. The possibilities would be endless and it would open ZWiki for several more uses than it is capable of now.

See also: PluginAPIDiscussion