Volto on an existing site

Before i dive into Volto World. My primary question: Can i use Volto Frontend with an existing site and a lot of default contenttypes? Perhaps a stupid Question :wink: What i mean, come the page content automatic in the Volto Editor or is there an upgrade step necessary?

Not a stupid question at all.

Since Volto uses DraftJS which stores the body text as structured JSON instead of HTML, it is not possible to fully use a Plone website with the Plone "classic" backend and the Volto frontend. When you have a Volto site, you can still access the "classic" backend and browse your content. The other way around is also possible but Volto will not show any body text either.

Therefore we do not officially recommend mixing Volto with an existing "classic" Plone site. Though, you could give it a shot and report back. As long as you make a conscious decision which parts of the site you want to use with Volto and which ones with classic Plone, and you don't mix things up, it might work.

It depends also a bit what you mean with 'existing'. Do you want to keep using the Volto Frontend and the Plone html 'server side' frontend at the same time, existing next to each other as Timo interprets the question?

Or do you want to 'move' the existing site to using the Volto frontend exclusively? Those are two different paths.

As Timo explains the main difference is with the 'rich text' fields (like the body text on the Document CT', which has a different storage structure. If you migrate the existing HTML snippets to the blocks field, you are halfway there. At the PloneConf 2019 in Ferrara a migration solution was presented for these fields, but it's not trivial because you have to run javascript and Python side by side. The RedTurtle team has some experience with this AFAIK and has created some packages. (i.e. https://github.com/RedTurtle/redturtle.importer.volto)

The second challenge is that Volto on a new Plone site uses a variant of the normal document type which is a folderish page. Default Plone setups uses separate content types folder and page. If you migrate an existing site to Volto you will also have to look at this difference and for example migrate in a folder its 'item as default view' Document Richtext Field to the parent Folderish Page Block field.

I'm considering such a migation myself for the end of this year for a larget site, this is just the general overview of the main challenges as I see them for that project, other community members might have experience and more detailed information.

1 Like

Yes that was my question, what must happen with the existing content to use it in Volto (edit and so on). Thanks for clarification.

Where is the right place to ask everything on the subject "volto" here in the plone community ? I mean no JS problems but design and implementation questions. For example, should all request go via a custom rest-api point? Every request to backend? Or is a normal Browserview for an ajax request legitim? Example: I would like implement the Voting Behavior from the training, as my first "learning by doing" example, as a react component. What is the standard behavior to use the plone.protect authenticator token ? If i post a value, is plone.protect disabled in the rest api by default? Or should i get the token with a first request and with a second request i can send the value to write? That my first thoughts if i reflect my plan.

@1letter This forum is just fine to ask questions about Volto. We, the Volto community, also watch the https://gitter.im/plone/volto.

Volto uses extensively plone.restapi and plone.rest to communicate with the backend. The Python side is created as "rest endpoint services", somewhat similar to BrowserViews. Because this is REST, work is typically thought as "creating", "updating" and "retrieving" information, which is organised as serializers (transform ZODB content to JSON so that it can be read on the Volto frontend) and deserializers (read the JSON coming from the backend, get the "original" Python information and apply this transformations to the existing ZODB content). See the serializers/deserializers packages in the plone.restapi sourcecode. If you're experienced with Plone development you should have no issues working your way around.

If you implement the required serializers/deserializer or restapi endpoints, you won't have to worry about plone.protect, as that's taken care by the restapi framework.

1 Like

Also for others who read this thread and are curious about Volto material being available:

The more 'generic' high level concepts about Volto and introduction/functional/marketing material is something that has been become relevant in 2020 with the preparations for Plone 6 and the maturity of Volto and is has been and is being worked on by the community for the last 4-6 months.

For last year's Plone Conference (in 2019) and already before (previous Volto Sprints to onboard participants) @sneridagh @robgietema and others have created training material for the 2 days training before that Conference:

These are all three available on training.plone.org You can work through the material online in your own time, they are not only meant for a 'class setting'. They will give you a good overview of the concepts and how Volto is structured

The Volto trainings are not yet as complete or refined as for example the Mastering Plone training, because that one has been running for years and years and has gotten little/more of incremental improvements. In general the material on training.plone.org is at least reviewed and updated/tested every year before it runs at the Plone Conference. Volto is just too new for this, last year we had the first 'training round' which was great. I attended and can really recommend the Hands-on one from Victor, but you need the skills teached in the previous two as well.

A lot has been added to Volto this summer, for example the architecture of 'add'-ons', editing of dexterity content types, more block features. Also this year the editor experience has received significant updates with a collapsible sidebar, I hope I describe it correctly. All this really cool stuff still has to be first understood by more people outside the developers who have and also documented and added to the new training material.

Also: There is a 'plone6' branch on the Github repository which contains all training material from training.plone.org: https://github.com/plone/training/commits/plone6/mastering-plone where from the first chapters onward the training is rewritten to use Volto for the frontend parts of the explanation. but this is still (a lot of work) in progress, where also the newer Volto concepts might need to be reviewed and updated where applicable.


Plone Foundation Code of Conduct