[Product-Developers] Wicked - custom TxtFilter (WickedFilter)

Radim Novotny novotny.radim at gmail.com
Sat Aug 23 11:49:14 UTC 2008


Hi,

I'd like to implement custom text filter applied on field rendering. I'v 
tried to follow doctest in wicked/fieldevent/README.txt, but it does not 
work for me.

How do I register custom filter (simple txtfilter_output method) in wicked?

I'v tried to follow txtfilter-example.zcml but nothing happens. I 
registered subscriber:

   <subscriber
      handler=".custom_txtfilter.txtfilter_output"
      for="wicked.interfaces.IAmWickedField
	  wicked.interfaces.IAmWicked
	  wicked.fieldevent.IFieldRenderEvent"
      />

but handler is not called. Debugging shows, only 
wicked.fieldevent.notifyFieldEvent is called when this event is fired 
from 
http://dev.plone.org/collective/browser/wicked/trunk/wicked/fieldevent/__init__.py#L29 

and this method calls another subscribers in the handle() method call - 
http://dev.plone.org/collective/browser/wicked/trunk/wicked/fieldevent/__init__.py#L21 

These subscribers seems to be defined in registration.py.

How do I register custom handler in there ? Do I have to use 
"registration.py" somehow ?

I'm confused :(

First of all I want to be able to create own custom filter, for example 
for {{TEXT}}. After that, I want to disable default bracketing filter [[ 
]] and replace it with my own implementation.

Thanks in advance,
-- 
Radim





More information about the Product-Developers mailing list