Hi!

 Schemaextender with the marker interface works very well.

 I've almost done with subtyping but I've a problem. When I subtype, I get:

Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module p4a.subtyper.browser, line 65, in change_type
AttributeError: 'module' object has no attribute 'IDynamicallyViewable'


And it is true, cause IDynamicallyViewable really does not exists.

Then looking how slc.publication does, I've found the trick:

import p4a.z2utils #Patch CMFDynamicViewFTI

This add the missing interfaces.

The result is in attach, so other can benefit of this kind of "behaviour". I think Dexterity has done a great job in introducing "behaviours" :)

Il 18/06/2010 10:18, Martin Aspeli ha scritto:
On 18 June 2010 15:21, Yuri<[email protected]>  wrote:
Hi!

  I would like to add to existing content types some fields. Then I can
use schema.extender. Then, I would like to apply this "extension" only
when "subtyping" is enabled (example: a Document, after pulling down the
subtype menu, show more field in edit).

  Is there some example code available somewhere? Is it easy to use
schemaextender and subtyping together?
Subtyping is just a fancy word for adding a marker interface. Register
your schema extender adapter for that same marker interface, and you
should be fine.


Attachment: subtype_plus_schemaextender.tar.gz
Description: GNU Zip compressed data

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to