For on-page editing setup, there is information in the dev docs here: https://docs.developers.optimizely.com/content-management-system/v1.0.0-CMS-SaaS/docs/enable-live-preview#content-preview
Basically, for on-page editing, after configuring the CMS, your frontend (regardless of framework, and where it's hosted) loads within an iframe inside the CMS. Then there are two ways to get draft content from Graph for content preview/on-page editing:
In either case, that draft content is stored in the same Graph instance as the published content -- you're just modifying your query to return the draft version (or any other version, really).
Thank you Daniel.
I have checked out the documentations and it said that it require a SPA client in order to do On Page Editing with Content Graph: (Edit on-page using Optimizely Graph)
This might not be possible with clients as they only want to maintain a single NextJS repository. We don't want to create another SPA repo just for On Page Editing.
Is there another way around this ?
To be clear, if you're using the SaaS CMS (not the PaaS CMS), the docs link in my previous comment is the one you want to be using -- there are some slight differences to how you configure the on-page editing.
In either case, I don't think a SPA is required, just a front-end app that then gets rendered (via iframe) inside the CMS.
Hi all,
I’m seeking advice on setting up a real-world implementation of Optimizely SaaS with Next.js. Here’s our setup:
Questions:
On-Page Editing Setup:
Multisite Setup in Next.js:
getContentByPath
query to fetch content from Content Graph based on the URL.I’d appreciate any insights, suggestions, or best practices for addressing these challenges.
Thank you in advance!