5

We have a requirement to place/generate XPM markups tags into the preview website not to live website, but we don't have seprate pages in CMS, only have seprated targets for preview and live websites/environment.

How we can achieve this, do we need to create seprate pages in CMS for preview and Live environment, so that those pages which contain XPM markups will publish only on preview environment and rest will get published in Live environment.

1
  • It really should be the same set of pages. Content editors will preview and edit a page and its content as it's published on Staging. When they're done they should publish the same page to Live. Otherwise they're not really previewing the pages before publishing to Live. :-) Commented Jul 22, 2014 at 23:13

1 Answer 1

4

If you use Experience Manager and the XPM Building Blocks, the tags will only be generated for targets that are marked as "Use for Experience Manager" (the check box on the General tab of the Publication Target).

If you generate the tags yourself, then you should use a similar approach. At run time, determine if the current target you're publishing to is enabled for Experience Manager, and then decide to render (or not) the markup.

1

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.