Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added doc for custom_widgets

  • Loading branch information...
commit 1cbae53dbc79c1bb8463044981e095c1c3d36c08 1 parent 678ec15
@kagesenshi kagesenshi authored
View
9 README.rst
@@ -44,12 +44,19 @@ Sample code::
from zope import schema
from zope.interface import Interface
+ from plone.app.form.widgets.wysiwygwidget import WYSIWYGWidget
class IExtraFields(Interface):
- my_extra_field = schema.TextLine(title=u'Extra field')
+ my_extra_field = schema.Text(title=u'Extra field')
class MyCustomRenderer(BaseRenderer):
title = 'My Custom Renderer'
schema = IExtraFields
template = ViewPageTemplateFile('path/to/template.pt')
+
+
+ #optional
+ custom_widgets = {
+ 'my_extra_field': WYSIWYGWidget
+ }
View
2  docs/HISTORY.txt
@@ -4,7 +4,7 @@ Changelog
2.0.2 (unreleased)
------------------
-- Nothing changed yet.
+- Added way to assign custom widget [kagesenshi]
2.0.1 (2012-03-20)
View
4 src/collective/portlet/collectionmultiview/collectionmultiview.py
@@ -53,11 +53,13 @@ class Assignment(base.Assignment):
limit = None
def __init__(self, header=u"", target_collection=None, limit=None,
- renderer='default'):
+ renderer='default', **kwargs):
self.header = header
self.target_collection = target_collection
self.limit = limit
self.renderer = renderer
+ for key, value in kwargs.items():
+ setattr(self, key, value)
@property
def title(self):
Please sign in to comment.
Something went wrong with that request. Please try again.