Can Plone classic and Volto coexist?

Is content created and edited using Plone classic (TinyMCE) viewable in a Volto front end? (and vice versa?)

1 Like

In short:

  1. Yes if you only modify schema-based content and do not use the blocks-editor, i.e. the editor you get when enabling the plone.blocks behavior (which is usually enabled when using Volto).
  2. It is not recommended.

See 11. Volto Basics — Plone Training 2021 documentation

[...] For example Volto features the Pastanaga Editor, allowing you to visually compose a page using blocks. This feature is enabled for content types that have the dexterity behavior volto.blocks enabled.
Using the Pastanaga Editor, the content you add in blocks and the arrangement of blocks is stored as JSON in the schema fields blocks and blocks_layout provided by the dexterity behavior volto.blocks. Additionally you can edit all fields of the content type schema in a sidebar.
If you do not use the behavior volto.blocks the fields from a content-type schema are edited and stored exactly like previously in Plone.

4 Likes

Thanks Philip.

According to that page, it sounds like if we disabled the volto.blocks behaviour we would get "standard" Plone content editable through that Volto sidebar.

Is it not recommended only because we'd miss out on being able to use the Pastanaga editor? (and all the lovely new blocks)

Trying to determine the effort to migrate a fairly complex site with many add-ons...

3 Likes

@tkimnguyen Here's my 2 cents:

  • It's possible to do a Plone/Volto site without the blocks/Pastanaga behaviour. What's more, if you have non-block content, the fields are edited using the main page area, not the sidebar, so the experience is pretty much like classic Plone.
  • But you'll have to implement view components for your content types. Which is not too bad, see the newsitem view, for example and how to display richtext HTML coming from tinymce (also Volto can produce HTML richtext in richtext schema fields).
  • One area where I think Volto is an improvement over classic Plone is the "widgets story". You have a lot of freedom and power on what you can do as a widget component, you don't have to worry about static resource registration, how to bundle third party libraries and so on. The API that you have to implement is also extremely simple, more or less a component that gets a value and calls onChange prop when it's mutated. See the TextareaWidget as an example of this. Also, "wiring" of this widget into the widget resolution machinery is straightforward.

Figuring out how to do a website with Volto blocks is a bit of a challenge when coming from Plone... we're used to modeling the website as content and not "content particles". But the Volto blocks are not mandatory for a Volto website, you can use them only in landing pages or pages with mixed content like static text and images, etc. And finally, I think Volto blocks might be easier to reuse across multiple projects, as they represent a smaller investment into a particular addon.

2 Likes

My 2c. Full agreement with Philip and Tiberiu. Just two points I would like to stress why this approach is not recommended:

a) without blocks you miss the main feature of Plone 6 / Volto. Most of the awesome features and add-ons we have are blocks. Plone 6 is all about blocks blocks blocks!

b) when you run a Plone 6 / Volto site with the schema based approach you are basically on your own. Meaning that I am not aware of anyone in the Volto community who does this. This is all open source, so if lots of people have the need for it, it might become easier over time. It is just nothing that the Volto core contributors are currently concern themselves with (as far as I know).

With @eeacms/volto-metadata-block it's possible to expose a metadata field (any schema field) as a volto block, so you can mix blocks and metadata in the presentation.

IMHO there's a missing piece of functionality right now in the volto-metadata-block, which is to set a metadata block as "hidden" in the view page. This would enable using the Dexterity Layout as a better designer for an edit form, where the blocks are the "fields" of that particular content type.

1 Like

I have been playing around a bit with Plone 6.0.0a1, bouncing back and forth between Classic and Volto. I am wondering if anyone is working on any notion of read-only rendering of blocks (originally edited in Volto) in Classic?

I am imagining sites with clear producer/consumer dichotomy, for some hypothetical use-case where editors use Volto, and readers use Classic. Could it be reasonable, to use what is persisted on page.blocks and page.blocks_layout attributes, to build views and styles to render non-interactive blocks into a transformed static "content core" for consumption in other contexts (browser and app-embedded HTML)?

1 Like

It is possible, not sure about reasonable.

We've been on this path. Once you get more comfortable with Volto, the classic UI will become mostly irrelevant.

1 Like

Can be useful for future migration from Classic to Volto?

Is there any script to migrate content from Plone 5.2 to Volto with blocks?

1 Like

We are working on that. The Blocks Conversion Tool is part of this effort

2 Likes

So I can understand you would want to have the flexibility of blocks flow of blocks for ‘presentational or long read pages. But lets consider the non hypothetical case of a commercial organisation selling products and part of their website is the product catalog. Then you have a ‘Product’ content type which is fulty schema based and you don't want editors to create different layouts for different products.

However a such a product would have (in Plone Classic edit view) have 1 or more richt text fields for for example at least the generic product description. And maybe a section on service or support which is also a richtext field.

There would also be a lead image field which you would use for the product catalog overview and to list the product of you want to integrate in a promotional page with the new Volto listing block on another part of the site.

You only have one blocks behavior on this content type, so it seems either/or. But I find it hard to believe thar none of the early adopters has not had a use case for more structured content types.

How would such a ‘hybrid’ content type function?

1 Like

For the EEA websites we need quite strong schema/metadata support, so we have the Metadata Block GitHub - eea/volto-metadata-block: Metadata Block Volto add-on that enables Document metadata insertion within the Blocks area.. One possible use scenario would be that you use the Dexterity Layout (which basically precooks the blocks for a particular content type) and drop some metadata blocks, so you can comfortably edit the schema fields alongside the rest of the rich text blocks.

When simplified, Volto's blocks are just a replacement for the TinyMCE editor, so if you use Volto blocks you're basically stuck with just a single richtext area. There is still a richtext editor for richtext fields, so you can have multiple of them in the schema. Check the News or Events items implementation in Volto, they're quite basic but ok. I don't know, as far as I'm concerned, there's no roadblocks in using classic dexterity-based types in Volto, except maybe for the limited capabilities of Volto's multi-paragraph richtext editor, compared to TinyMCE.

We also have the situation of an Editor who inserts various contents into the portal every day. Often these editors want the content to have the same diagramming. Wouldn't it be tedious for him to have to "set up the diagramming" on all the content he inserts, since he has to insert a lot of content? Is there a way to create a "standard diagramming" for a given content type?

What do you mean by “diagramming”?

I mean the position of elements on the screen. Imagine that the Editor always has to publish a text with an image on the right. He will have to "put the image to the right" every time. This was a simple example but imagine more complex things.

Ah then the Mosaic feature you want is called layouts. Each content type can have one or more possible preconfigured layouts, and a regular content editor can choose one, but only with a different permission can an editor modify or create a layout. This describes the feature plone.app.mosaic/content-layouts.rst at master · plone/plone.app.mosaic · GitHub

And in Volto? Is there something similar?

Yes, Volto has few set of addons that let you do "mosaic things" like layout. In EEA we have GitHub - eea/volto-columns-block: A Volto block that provides columns of blocks , this helps you to deliver different widths layout in a way you want.

@wesleybl Plone 6 (Volto) allows you to create templates for any content type TTW in no time:

You can create those templates with any block that is available. E.g. the grid-block

that allows sophisticated page layouts with columns.

Here are two videos:

There are two other grid solutions from EEA (mentioned by Nilesh) and from Red Turtle.

1 Like

Plone Foundation Code of Conduct