https://github.com/fourdigits/products.orderablereferencefield
https://github.com/fourdigits/products.orderablereferencefield
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/fourdigits/products.orderablereferencefield
- Owner: fourdigits
- Created: 2018-01-03T12:09:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-03T12:55:46.000Z (over 8 years ago)
- Last Synced: 2025-02-05T05:41:24.063Z (over 1 year ago)
- Language: Python
- Size: 2.04 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
- Changelog: CHANGES.txt
Awesome Lists containing this project
README
Introduction
============
This product provides an Archetype field that's very similiar to the Archetypes
Reference field, with the addition that it stores the order of referenced objects.
You can use two different widget for manage reference order:
- the ``OrderableReferenceField`` (default ones), someway similar to the
`InAndOutWidget`__
- the ``OrderableReferenceBrowserWidget``, that use the default `ReferenceBrowserWidget`__
__ http://plone.org/documentation/manual/developer-manual/archetypes/fields/widgets-reference#InAndOutWidget
__ http://plone.org/documentation/manual/developer-manual/archetypes/fields/widgets-reference#ReferenceBrowserWidget
Usage
-----
1. Add this package to your buildout or setup.py of your custom-package
3. Add one of those lines to your custom Archetype to import the fields::
from Products.OrderableReferenceField import OrderableReferenceField
or::
from Products.OrderableReferenceField import OrderableReferenceBrowserWidget
4. In your schema, add an OrderableReferenceField like this::
BaseSchema + Schema(( ...
OrderableReferenceField('afield', relationship='somrel'),
...
))
in alternative, write something like this for use the other widget::
BaseSchema + Schema(( ...
OrderableReferenceField('afield',
relationship='somrel',
OrderableReferenceField()),
...
))
Credits
-------
- Written by Daniel Nouri
- Thanks to Ilia Goranov for the JavaScript
- Thanks to Ender for
improving usability of the widget.
- Thanks to jladage for adding the
css and js to ResourceRegistries
- Thanks to mirella
for cleaning up the template by moving style elements to the css.
- Eggification by aclark
- Move install-code to GS-profiles by WouterVH
- ``OrderableReferenceBrowserWidget`` widget added by RedTurtle Technology
Copyright
---------
Copyright (C) 2006 "Zest Software": http://zestsoftware.nl