Custom z3c.form field that allows to use Volto blocks.
This field can replace RichText fields in your custom content-types.
- store a json object with all blocks informations (data and order)
- restapi serializer/deserializer to manage internal links
- registered custom indexer for collective.dexteritytextindexer (if installed)
Import it and use as a normal field:
from collective.volto.blocksfield.field import BlocksField class IMySchema(Interface): my_field = BlocksField( title="A field with blocks", )
From 2.2.0 version, objects with BlocksField are marked with a marker interface and blocks are indexed in block_types index.
To update contents already created in the site, you need to create an updgrade-step or call "@@mark_contents_and_reindex" view.
Install collective.volto.blocksfield by adding it to your buildout:
[buildout] ... eggs = collective.volto.blocksfield
and then running bin/buildout
You don't need to install it.
- Tests
- Issue Tracker: https://github.com/collective/collective.volto.blocksfield/issues
- Source Code: https://github.com/collective/collective.volto.blocksfield
The project is licensed under the GPLv2.
This product was developed by RedTurtle Technology team.