Skip to main content

Volto integration add-on for Plone

Project description

https://github.com/plone/plone.volto/actions/workflows/tests.yml/badge.svg

plone.volto

plone.volto configures Plone to work with Volto, the new default frontend for Plone 6.

Installation

Install plone.volto by adding it to your buildout:

[buildout]
...

[instance]
...

eggs =
    plone.volto
    ...

Compatibility

plone.volto currently works for both Plone 5.2 and Plone 6 (pre-alpha and alpha). It support Python 3.7, 3.8 and 3.9.

Though, Volto requires specific versions of plone.volto and plone.restapi:

plone.volto

plone.restapi

Reason

3.1.x

8.13.0 and above

Requires new JSONSummarySerializerMetadata serializer added in plone.restapi 8.13.0

2.x (kitconcept.volto)

7.0.0 and above

New image scales

1.x (kitconcept.volto)

6.0.0 and below

New transforms and features

plone.restapi 7.x.x is included in Plone 5.2.4 (and later).

You can still use 2.x in p.restapi 7.0.0 based installations but the transforms included won’t work.

Volto only supports the latest plone.restapi branch, therefore it is recommended to always use the latest version in your Volto projects.

Plone 6 Architecture

Architectural Diagram of Plone 6:

Frontend
┌──────────────────────────────┐
│                              │
│            Volto             │
│                              │
└────────┬────────────┬────────┘
         │            ▲
         │    HTTP    │
Backend  ▼            │
┌────────┴────────────┴────────┐
│┌────────────────────────────┐│
││        plone.restapi       ││
│└────────────────────────────┘│
│┌────────────────────────────┐│
││         plone.volto        ││
│└────────────────────────────┘│
│┌────────────┐ ┌─────────────┐│
││   Plone    │ │   Add-Ons   ││
│└────────────┘ └─────────────┘│
└──────────────────────────────┘

Features

plone.volto provides the following features:

Volto Blocks Support

plone.volto enables the new Volto Blocks editor on Document, Language Root Folder and Site Root.

Multilingual Support

plone.volto supports multilingual websites. Install PAM before installing this package and demo homepages will be created in each enabled language. Currently only support for EN/DE.

Volto Blocks for Plone Site Root

plone.volto contains a hack to make the Plone site Volto blocks-enabled with some demo content. You can take only the hack to enable the blocks on your site.

You can see it in action in the Volto demo: https://6.demo.plone.org

Install the provided profile to install it by default:

plone.volto:default-homepage

e.g. in your GS metadata.xml along with your other dependencies:

<metadata>
<version>1000</version>
<dependencies>
  <dependency>plone.volto:default-homepage</dependency>
</dependencies>
</metadata>

Document Content Type

plone.volto disables the Richtext and Table of Contents behaviors for the Document content type. Rich Text functionality is provided by the new Volto Blocks editor. The Table of Contents functionality is provided by the Table of Contents Block in Volto.

CORS Profile

A quick helper for enable CORS for development config is also provided in the plone.volto module. So you can call:

<include package="plone.volto.cors" />

from your ZCML while developing.

Enable it on demand, since it’s considered a security issue if you enable CORS in your productions sites.

It’s planned that Volto will feature a development pass-through proxy to the backend in the future. It will be addressed in next sprints.

ZLog Patch

p.restapi low level errors are routed through the ancient ZLog and are plone_error enabled, making it difficult to follow since all are marked with a UUID. Specially if using helpers like Sentry. This patch removes the UUID so the same error is categorized all together. This is planned to be addressed in next sprints.

Patch for subject Field

There are some problems of serialization on special characters derivated from how the current shape of the Plone’s default Dexterity subjects field that has to be addressed in order to make it work properly with Volto (and other systems that are not Plone). This will be fixed in core in upcoming sprints.

Preview Image Behavior

The preview image behavior makes content types provide a preview_image field that can store a preview image that Volto views can pick up. This is especially userful for listings (e.g. listing block customizations) and teaser elements (e.g. teaser blocks such as [volto-blocks-grid](https://github.com/kitconcept/volto-blocks-grid)).

The “volto.preview_image behavior can be enabled in the generic setup XML definition of a content type (e.g. “/profiles/default/types/MyContentType.xml”):

<?xml version="1.0" encoding="UTF-8" ?>
<object i18n:domain="fzj.internet" meta_type="Dexterity FTI" name="MyContentType"
  xmlns:i18n="http://xml.zope.org/namespaces/i18n">

  ...

  <!-- Enabled behaviors -->
  <property name="behaviors" purge="false">
    ...
    <element value="volto.preview_image" />
  </property>
  ...
</object>

Head Title Behavior

The headtitle makes content types provide a headtitle field that can be used by Volto in teasers and alikes.

The “volto.head_title” behavior can be enabled in the generic setup XML definition of a content type (e.g. “/profiles/default/types/MyContentType.xml”):

<?xml version="1.0" encoding="UTF-8" ?>
<object i18n:domain="fzj.internet" meta_type="Dexterity FTI" name="MyContentType"
  xmlns:i18n="http://xml.zope.org/namespaces/i18n">

  ...

  <!-- Enabled behaviors -->
  <property name="behaviors" purge="false">
    ...
    <element value="volto.head_title" />
  </property>
  ...
</object>

Image Scales

This package introduces new Plone image scales in Plone and redefines a couple of existing ones. These are know to work well with Volto layout and grid system:

icon 32:32
tile 64:64
thumb 128:128
mini 200:65536
preview 400:65536
teaser 600:65536
large 800:65536
larger 1000:65536
great 1200:65536
huge 1600:65536

This change is opinionated and may collide with your previously defined ones, so make sure your add-on’s profiles are applied AFTER this one.

Credits and History

kitconcept

The code of plone.volto has been under active development and is used in production since 2018. First as kitconcept.voltodemo (deprecated since March, 5th 2020), then as kitconcept.volto. In September 2021 kitconcept.volto has been renamed to plone.volto and has been contributed to the Plone core as part of PLIP #2703.

Contributors

  • Timo Stollenwerk, Original Author

  • Victor Fernandez de Alba, Original Author

  • Érico Andrei

  • Carsten Senger

  • Roberto Diaz

  • Rodrigo Ferreira de Souza

  • Alin Voinea

Changelog

3.1.0a6 (2021-11-22)

New Feature:

  • Add Italian translations [cekk]

Bug fix:

  • Update German translations [timo]

  • Fix translation files [cekk, timo]

3.1.0a5 (2021-11-07)

New Feature:

  • Use new metadata utility for adding the image_field to the default serialization. This feature requires the JSONSummarySerializerMetadata serializer that has been added with plone.restapi 8.13.0. [ericof]

Internal:

  • Use plone/setup-plone github action. [ericof]

3.1.0a4 (2021-10-29)

Internal:

  • Initial support and tests using Github Actions for Plone with pip installations. [ericof]

3.1.0a3 (2021-10-25)

Breaking:

  • Explicitly require Python 3.7 or superior. [ericof]

Internal:

  • Remove jq from dependencies and remove old blocksremoveserver.py script. [ericof]

  • Remove z3c.jbot from dependencies [ericof]

  • Remove requests from dependencies [ericof]

3.1.0a2 (2021-10-14)

Bug fix:

  • Fixed install on Windows, issue 14. [maurits]

3.1.0a1 (2021-10-11)

Feature:

  • Add new image_field metadata for image detection in catalog [sneridagh]

Internal:

  • Add Plone 6.0.0-pre-alpha configuration. [tisto]

  • Upgrade to Plone 5.2.5 [tisto]

  • Change GS setup profile label to “Plone 6 Frontend (plone.volto)”. [tisto]

3.0.0a1 (2021-09-25)

Breaking Change:

  • Rename kitconcept.volto to plone.volto. [tisto]

2.5.3 (2021-09-13)

  • Fix condition of the guard for the multilingual fixture in the docker image. [sneridagh]

2.5.2 (2021-09-13)

  • Fix multilingual fixture for docker image, the guard seems not to work there, for some reason the blocks and blocks_layout are not set yet (?) [sneridagh]

2.5.1 (2021-09-12)

2.5.0 (2021-09-12)

  • Support pip-based Plone installation by explicitly including dependencies on configure.zcml [ericof]

  • Add Lock-Token to default CORS allow_headers [avoinea]

  • Add guard for not overwrite blocks in default home pages (if PAM enabled) if they are already set [sneridagh]

2.4.0 (2021-07-19)

  • Fix German translation for “Navigation title” (“Navigation titel” -> “Navigationstitel”) [timo]

  • Fix and complete upgrade step from Volto 12 to Volto 13 [sneridagh]

  • Add helper scripts [sneridagh]

  • Add preview_image to transforms [sneridagh]

  • Add headtitle behavior [sneridagh]

  • Guard for setuphandlers disablecontenttype [sneridagh]

  • Fix audit script [sneridagh]

  • Add support for subblocks in the custom transforms for volto-blocks-grid [sneridagh]

2.3.0 (2021-05-19)

  • Add upgrade step facility

  • Add upgrade step from Volto 12 to Volto 13 [sneridagh]

2.2.1 (2021-04-21)

  • Better multilingual profile [sneridagh]

2.2.0 (2021-04-21)

  • Add multilingual test fixture for Cypress tests [sneridagh]

2.1.3 (2021-03-26)

  • Add requests as dependency [sneridagh]

2.1.2 (2021-03-07)

  • Add a demo home page for demo site [sneridagh]

2.1.1 (2021-03-06)

  • Add demo site profile [sneridagh]

2.1.0 (2021-02-23)

  • Remove Images and Files from types_use_view_action_in_listings since in Volto it’s no used at all. [sneridagh]

2.0.0 (2021-02-20)

  • [Breaking] Define good known to work well with Volto image scales in registry.xml GenericSetup profile. When this add-on is installed or the profile is applied, it will overwrite the existing scales in your Plone site. If you are using specific scales for your project, make sure they are installed after this addon’s profile.

    This scales have been tested in real production projects and work well with Volto’s layout and responsive viewports. [timo, sneridagh]

1.7.2 (2021-01-26)

  • Nothing changed yet.

1.7.1 (2021-01-25)

  • Fix first level tabs and add nav_title to them [sneridagh]

1.7.0 (2021-01-21)

  • Add breadcrumbs_view override to include nav_title [sneridagh]

1.6.0 (2021-01-14)

  • Added indexers for preview_image, it allows the Volto object browser widget to access it [sneridagh]

1.5.2 (2020-12-14)

  • Missing ZCML for translations [sneridagh]

1.5.1 (2020-12-14)

  • Add zest.pocompile [sneridagh]

  • Add missing .mo [sneridagh]

1.5.0 (2020-12-09)

  • Fix locales default in German [sneridagh]

1.4.0 (2020-07-29)

  • Add volto.preview_image behavior to Page type. [timo]

1.3.2 (2020-05-17)

  • Make sure that the enable_pam helper does its job. [sneridagh]

1.3.1 (2020-05-12)

  • Fix LRF global allow and ensure default behaviors [sneridagh]

1.3.0 (2020-05-11)

  • Add registry navigation setting for not show the current item in navigations [sneridagh]

  • New enable_pam setuphandlers helper [sneridagh]

  • New enable_pam_consistency setuphandlers helper [sneridagh]

1.2.0 (2020-04-17)

  • Bring back the event type, since it’s fully working in Volto now [sneridagh]

  • fix typo in behavior name navttitle -> navtitle [sneridagh]

1.1.0 (2020-03-10)

  • Added a specific IImageScaleFactory for Image content type, to fix SVG handling [sneridagh]

1.0.1 (2020-03-08)

  • Update version numbers in default home page. [sneridagh]

1.0.0 (2020-03-06)

  • Add Zope log patch [sneridagh]

  • Add nav_title and preview_image behaviors [sneridagh]

  • override plone.app.vocabularies.Keywords with a version that uses the unencode subject value as the token. [csenger]

  • Remove versioning behavior from Document type. [timo]

  • Backport all features that were in plone.voltodemo [sneridagh]

  • Patch Password reset tool in Products.CMFPlone to use the optional volto_domain in the e-email which is sent to users, only if the request is made through REST. [fredvd]

  • Add Volto settings control panel with frontend_domain field. [fredvd]

  • Homepage profile for demo purposes [sneridagh]

  • CORS profile [sneridagh]

  • Enable Volto Blocks for Document and LRF [sneridagh]

  • Initial release. [kitconcept]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plone.volto-3.1.0a6.tar.gz (51.1 kB view hashes)

Uploaded Source

Built Distribution

plone.volto-3.1.0a6-py3-none-any.whl (57.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page