| Version 5 (modified by olha, 15 years ago) (diff) |
|---|
collective.referencedatagridfield
Links
Introduction
collective.referencedatagridfield is a mix of Reference and DataGrid fields for Plone.
This is a sophisticated reference field with its own widget for browsing, adding and deleting references for both internal and externsl resources. Completely supporting Archetype's Reference field functionality, it also allows external links.
This package functionality is based on DataGridField, DataGridWidget and Archetype's Reference field with ATReferenceBrowserWidget.
On installation required Products.DataGridField package is automatically installed.
Example
This package allows Plone developers to:
- extend default Plone Reference field functionality
- override existing Reference field functionality with a custom one
There is an example of simple content type creation with a mix of Reference and DataGrid fields as related items: http://svn.plone.org/svn/collective/collective.referencedatagridfield/collective/referencedatagridfield/examples/ReferenceDataGridDemoType.py
from AccessControl import ClassSecurityInfo
from Products.Archetypes.public import *
from Products.ATContentTypes.content.base import ATCTContent
from collective.referencedatagridfield import PKG_NAME
from collective.referencedatagridfield import ReferenceDataGridField
from collective.referencedatagridfield import ReferenceDataGridWidget
class ReferenceDataGridDemoType(ATCTContent):
""" Simple ReferenceDataGridField demo."""
security = ClassSecurityInfo()
schema = BaseSchema + Schema((
ReferenceDataGridField('demo_rdgf',
schemata='default',
relationship="demo_relation",
widget = ReferenceDataGridWidget(
label = "Reference DataGrid Field(s)",
visible = {'edit' : 'visible', 'view' : 'visible'}
)
),
))
meta_type = portal_type = archetype_name = 'ReferenceDataGridDemoType'
registerType(ReferenceDataGridDemoType, PKG_NAME)
The above example adds a new simple content type to Plone -
Attachments (6)
- add.jpeg (122.2 KB) - added by olha 15 years ago.
- edit.jpeg (54.8 KB) - added by olha 15 years ago.
- internal.jpeg (105.9 KB) - added by olha 15 years ago.
- edit1.jpeg (80.5 KB) - added by olha 15 years ago.
- edit2.jpeg (85.8 KB) - added by olha 15 years ago.
- example.jpeg (85.3 KB) - added by olha 15 years ago.
Download all attachments as: .zip
![(please configure the [header_logo] section in trac.ini)](/trac/chrome/common/qtrac_logo.png)