4

I am Using SDL Web 8.5 with DXA. We are creating a third party web page which integrates widgets from different sources like CRM, Ecommerce and SDL CMS.

We exposed SDL CMS widget using Content Service which provides complete Widget HTML along with all XPM tags. When I browse this DXA URL, It works fine with XPM.

But can someone suggest how I can integrate this widget service URL on Third Party page where XPM is also functional for this CMS Widget.

Thanks Piyush Jain

7

XPM will always need a Page URL to work, but it can deal with editing content which isn't embedded on that Page.

So when supplying the XPM markup, you have to ensure you are adding the Page markup also, and use a "dummy" Page URI. That is the URI of a Page which actually exists in your CMS, but you will only use for editing the content on your third party page. It is basically making sure that your content has the XPM markup it currently already has, and add the following for the Page:

<!-- Page Settings: {"PageID":"tcm:1-2-64","PageModified":"10/23/2014 4:31:20 PM","PageTemplateID":"tcm:1-3-128","PageTemplateModified":"10/10/2014 3:34:29 PM"} -->
<script type="text/javascript" language="javascript" defer="defer" src="http://your.cms.url/WebUI/Editors/SiteEdit/Views/Bootstrap/Bootstrap.aspx?mode=js" id="tridion.siteedit"></script>

This is the XPM Page parkup with the details of your "dummy" Page, and the XPM bootstrap script, which will add the XPM edit button for you.

  • Thanks Rick, I know about this, See what I trying to do is, For example I took Header.html DXA Page, Which works fine when I browser this Page Using CMS URL (XPM also works fine). Now I took Whole View Source of this header Page and Put this HTML +XPM tags along with all required JS/CSS files to Third party page, I am able to get XPM button, But when I am trying to click XPM button and try to edit the page, It says Page not found, May be because it is rendering on Third Party page, If somehow we can set actual page URL to this HTML+XPM, then may be we can achive the desire result. but how? – Piyush Jain Apr 19 '17 at 5:04
  • @PiyushJain can you edit your question and update it with more information, like a detailed error etc. A quick test I just did worked fine, with the exception of updating the preview and publishing the changes (since the Page URI I'm using is not available under a mapped base URL for Topology Manager, if you would add a TTM mapping for the base URL it will all work) – Bart Koopman Apr 19 '17 at 8:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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