Volto features the Pastanaga Editor Engine, allowing you to visually compose a page using blocks. The editor allows you to add, modify, reorder and delete blocks given your requirements. Blocks provide the user the ability to display content in an specific way, although they can also define behavior and have specific features. Blocks are composed of two basic (and required) components: the block edit and view components.
Volto ships with a basic set of blocks, as described in the following list. For details of all their options, see Blocks settings. Some of the blocks are "restricted", they can't be added by the editors through the block chooser UI, for example the Title and Description blocks.
Connected to the
titlecontent type's metadata field. It renders as the
h1of the page. Cannot be removed by default, although this can be customized using
The rich text block. This is the default type of block when you add a new block to the page.
Allows insertion of an existing image or upload of a new one. In case of uploading, it gets added inside the content type (folderish) element. If the content is not folderish, it gets created side by side.
Allows insertion of either an external video (YouTube, Vimeo), or a video already uploaded to the site (File content type), into the page by referencing it.
Lists the contents of the content type when it is folderish. It also allows building a query to the database the results of which will be shown as items of the list. The listing block has variations defined by default (standard, summary, image gallery) to customize the look of the listing.
Allows you to insert a map from an external source (Google Maps, OpenStreet Maps).
- Table of contents
Insert the table of contents for the current blocks.
Show a customizable "Hero" block with a big image, a title, and a description.
Inserts arbitrary HTML.
A block that provides a form with a search user interface where you can customize the facets (search handlers) and the appearance of the search form.
Inserts a customizable table.
Connected to the
descriptioncontent type's metadata field.
Volto Blocks are not enabled by default in Plone content types, in order to enable this feature, you should enable provided behavior in a per content type basis.
The programmatic name of the behavior is
Blocks in the Behavior tab of the Dexterity Content Types control panel.
If you are using the
plone.volto package, it sets it up for you for the
Document content type.
See How to manually enable Blocks on a content type for details.
How to manually enable Blocks on a content type#
You can enable them on any content type by enabling
Blocks behavior provided by
Dexterity Content Types, select the content type.
You can also add the behavior programatically via GenericSetup:
<?xml version="1.0"?> <object name="LRF" meta_type="Dexterity FTI" i18n:domain="plone" xmlns:i18n="http://xml.zope.org/namespaces/i18n"> <property name="behaviors" purge="false"> <element value="plone.restapi.behaviors.IBlocks" /> </property> </object>
Test that the content type you've just enabled
Blocks behavior is working, by creating a new object of that type from Volto.