craft-neo
craft-neo copied to clipboard
FR: Export and Import to copy / paste blocks between environments.
The copy, paste & clone functionality in Neo is great, It had saved our clients a lot of time when they want to move content between pages on their site.
I was wondering about the possibility of adding export and import functionality to move content between different environments? Our clients often create content on our testing and staging environments to ensure everything works during development, and then have to recreate all the content again on the production site when a feature is ready to launch.
I can see when copy/paste is used a JSON representation of the field data gets copied to local storage. I was wondering if the ability to copy/paste that JSON data to the users clipboard would be enough? Since we're copying across environments some extra field checking would be necessary - Maybe comparing the hashes or modification dates on the project config to judge if the environments are compatible? - and relationships may need to be retested.
I know this workflow should probably be handled with content migrations to transfer entire entries, but writing migrations is often more work than manually copy/pasting all of the content. Given that a lot of sites use Neo as a page builder, the ability to copy/pasting the Neo blocks across environments would do 90% of a content migration.
Such a feature would save a lot of time! Moving content between environments is generally a missing point at Craft and I don't think that content migrations are the right choice. Moving content should be possible for editors without a developer (assuming the data schema does not change).
For those who wonder, I scoured and found that the copy function stores the blocks in a json object in the local storage. Opening the dev consol in the browser, in Application / Local Storage allows you to see that code and copy / paste it in the appropriate local storage key and then this allows to paste to the other site or environment. I've been using this to restore some content that gets lost.