This post intends to get you familiar with how Sitecore manages SelectRendering dialogs found in Experience Editor, how Sitecore Experience Accelerator (SXA) module is able to override those dialogs and how we can still use vanilla Sitecore based SelectRendering dialogs even after installing SXA module.
We are working on upgrading our application from Sitecore 8.2 to Sitecore 10.1.1. We have 100+ sites in our existing Sitecore instance and we are moving them from vanilla Sitecore sites to SXA based sites.
Problem
While testing the pages in Experience Editor, we noticed that the SXA based SelectRendering Dialog is different from vanilla Sitecore 10. For e.g. when you click on Add Here to add a rendering on your page in Experience Editor in Sitecore 10, below dialog opens up -
The new SXA dialogs also introduce a change in content author experience. We wanted to keep the experience for content authors same as vanilla Sitecore 10.
Solution
We started finding how to replace SXA based SelectRendering Dialog to vanilla Sitecore 10 dialog.
We found that SXA based SelectRendering dialog is rendered using SelectRendering.xml placed at -
<website directory>/sitecore/shell/override/Applications/Dialogs/SelectRendering
Also, the SelectRendering.xml for vanilla Sitecore based SelectRendering dialog is placed at-
<website directory>/sitecore/shell/Applications/Dialogs/SelectRendering
SXA uses /sitecore/shell/override folder to override the vanilla Sitecore 10 dialogs. So it made sense to us to copy the xmls for the vanilla Sitecore 10 dialogs into override folders. Simply doing this was enough to tell Sitecore which dialogs to use and it worked!!
At first, it looked like it would be something complex to achieve and may require customizing pipelines but it was as simple as that. We did something similar for SelectRenderingDatasource dialog as well.
I hope it helps you. Thanks!!
Comments
Post a Comment