Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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. :-) –  Alvin Reyes Jul 22 at 23:13

1 Answer 1

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.

share|improve this answer
    
Thanks Nuno for short answer, –  Nash Jul 22 at 12:31
    
Nuno also gave examples of these checks in this answer: stackoverflow.com/a/14642317/395495. –  Alvin Reyes Jul 22 at 23:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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