0

Given that we have an item with 3 versions, v1, v2 and v3.

Can we select a specified version, eg. v2, of the item for previewing on Nextjs headless? Currently, XM Cloud always publishes the latest version (v3).

Thanks.

1 Answer 1

0

This is how versioning and publishing works in all Sitecore XM/XP based products, the latest version of an item that is in the final workflow state (if workflow is in use) and is marked as publishable, will be the item that is published.

On XM Cloud you have 2 options for previewing. First you should be using workflow.

Option 1, use the preview GraphQL endpoint hosted on your CM. This can be found at https://<your cm url>/sitecore/api/graph/edge. The API Key can be found under /sitecore/system/settings/services/api keys. This will effectively give you a "Live Mode" preview. Anything in the master database will be shown.

Option 2 would require an extra Edge tenant that can be setup as a preview target. Then you can use a preview state in your workflow to publish to that preview Edge target.

References:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.