I’m building a landing page builder and need to save the current user’s edits they’ve made to a landing page and then allow them to publish these edits to live for public view.
What’s the best way to store edits and then mark them as “live” when publish is clicked?
(Custom states won’t seem to work as new things are being added to the database such as primary options and sub-options).
I would do this through the database. I would save the edits to a different data entry and then when the user clicked “publish” I would copy the edits to the live version.
Without knowing your database and app structure I cannot say for sure if you will need a backend workflow or not.
If I were creating it from scratch I would have 2 different data types. One for published and one for editing. They would be linked to each other and then I would just copy from the editing to the published on button click. No backend workflow needed. If you have a list of data to change you will probably need a backend workflow.