You are not logged in Log in Join
You are here: Home » Download Zope Products » Content Management Framework (ne "PTK") » ZWiki » CreatingAPortalContentZClass

Log in
Name

Password

 
 
WritingAPTKProduct »

CreatingAPortalContentZClass

Abstract

This page describes the steps needed to create a new type of PortalContent through-the-web, using ZClasses.

Recipe

  1. In the ControlPanel/Products folder, add a product, MyPortalContentProduct Note: you may also do this inside an existing ZClass product.

  2. Create a new ZClass?, MyPortalContent, in the product. Include Portal Content Base as one of its base classes.

  3. Add the "core" content: property sheets, DTML and Python methods, etc.

  4. Create a Wizard for your new class in the product. Arrange to copy it to your portal's Wizards folder.

  5. Override or extend the implementation of these methods from PortalContent:

    SearchableText

    signal the values you want indexed by default in the portal's full-text index

    Discussion methods

    add chrome to display/modify the discussion which hangs off of your object, e.g.:

    • addReplyForm

    • addReply

    • showReplies

  6. Add Your Class Name the list of ZClasses? that provide Content. This list is kept as a property of the portal_properties tool in your portal instance. The property is called content_zclasses.

Resources