New Sitecore Module: Layout Modes Comparer
Part 1: Overview
If you read this blog Post, you’ve probably found that you can’t reset the specific component, changed in the final layout.
As you know, final and shared layouts are just normal Sitecore fields in the layout section of the item.
So if you want to reset your changes in the final layout, you can reset whole final layouts field:
To understand the problem, let’s imagine that you work as a Content Editor with a big multi-language project. And now you realize, that you’ve just deleted or edited some component in a wrong language. How to fix it? Resetting the final layout is not an option, because there can be other components, created on this final layout by you or another member of your team. And now you have no other options besides creating this component again.
And this is just one of the cases happening often in each team. And I don’t need to remind anyone how much time and money it costs.
As a solution, I’ve created a new Sitecore Module “Layout Modes Comparer”. This module highlights each component, created/updated/deleted in the Final Layout. And what is even more important, it allows to reset your final layout changes per COMPONENT:
Now let’s take a look at the features of the module:
- The changes are shown in the Sitecore Message:
Click Presentation in shared and final layout to see the information about each change on the final layout. In the final layout it is shown in a red message. And don’t worry, it is not an error, it is just to draw attention to the fact that it is another mode.
- Highlight the changed components:
In the shared layout the module highlights the components updated or deleted on the final:
Red – deleted; Yellow - updated
- In the final layout it highlights the created or updated components:
Blue – created and yellow as usual 😊
- ToolTips show detailed information about every component’s changes:
- changed datasource item
- the components properties, updated in the final layout
- if your component is moved into another placeholder
- And of course, with this ExperienceEdit Button “Undo Components Changes” you can reset the specific component, changed in the final layout.
Notice: The final layout is configured for each language and version separately. It means that the module will show and reset only the changes of the current version on the current language.
Also, this module compares the final with shared layouts, and not the final layout with its standard values.
Part 2 : How to Install and Configure the module
How to Install, activate and configure this module
- Install the module:
You can find the Layout Modes Comparer on the Sitecore MarketPlace: https://marketplace.sitecore.net/Modules/L/Layout_Modes_Comparer.aspx
When you download it, you will get a Sitecore Package that can be installed with the Sitecore Package Installer:
- Activate the module:
- The module extends the “SelectLayout” logic. That’s why the first step is to go to the folder “sitecore\shell\client\Sitecore\ExperienceEditor\Commands”, to deactivate the Sitecore “SelectLayout.js” file and to activate the “SelectLayout.js_layoutModesComparer” (deleting the suffix “_layoutModesComparer”).
Now the module is ready to compare the shared and final layouts:
- Next step is to activate the most helpful feature, that allows to reset the components changes, you’ve made in the final layout:
To do it, please assign the Experience Edit button “Undo Components Changes” on the components or on the base renderings template (selecting the button in the /sitecore/templates/System/Layout/Sections/Rendering Options/__Standard Values)
- The module settings:
The changed components are highlighted with different colors:
- blue – new component
- red – deleted
- yellow – updated
The colors can be configured in the Core DB in the configuration Item “/sitecore/system/Modules/Layout Modes Comparer/Color Settings”
Now your “Layout Modes Comparer” is ready to work. Enjoy 😊