4

I have an issue with the DXA Experience Manager.

We have XPM in some Component Template of out site, but we need to disable it for specific ones. So we have unchecked the "enable inline editing" in our schema, but in the response of the DXA json is still including the "xpmMetadata", messing our code by adding html tags ("html", "span").

We know that we have to wrap the code in a html tag (ex: "div" or "span") to avoid the injection of extra tags ("html", "head", "body"...), but actually, what we need is NOT to have any extra html tag, because our entity is used in the

2

In DXA.NET, XPM markup is only generated in places where you have @Html.DxaEntityMarkup(), so you can control in your Views which elements are XPM editable and which not.

IIRC, this works differently in DXA Java, where XPM markup is always “injected” in the top-level HTML element of your Region/Entity View. So, you don’t have control over it in your Views, unfortunately.

You could create a custom Model Builder which removes the XpmMetadata on Entity Models which you don’t want to be XPM editable. In DXA 2.0, this can be done either CM-side or CD-side (in the Web App).

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.