ContentWidget/ContentField idea
Max M <[email protected]> Thu, 31 Aug 2006 13:55:52 +0200
| Newsgroups | gmane.comp.web.zope.plone.archetypes.devel |
|---|---|
| Message-ID | <[email protected]> |
I often need to populate a content type after its creation, but I think
it would be nice if there was a standard way of doing this.
Often I also need to attach properties to a content type. It would be
nice to reuse content types for this instead of making big changes to
products.
So I have though of a new field/widget pair, and would like to get some
feedback on the idea.
The basic idea is that a field can have a complex content type as a value.
E.g if I have an intranet content type, and I always want a 'news'
folder for that content type, I would add a ContentField like this.
ContentField = (
'news',
required=0,
show_in_folder_listing = 1
is_frontpage = 1
widget = ContentWidget(
portal_type = 'Folder',
title='Site news',
description='This folder is for news items',
init_script = 'setupNewsfolder',
)
)
The folder would then automatically be created in the content type. Just
like ordinary fields and the 'init_script' would be run on it.
Anybody see any pitfalls in this scenario?
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
Phone: +45 66 11 84 94
Mobile: +45 29 93 42 96
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642