Mode selector in AEM page
Hi All,
I have a requirement where I do not want timewarp and scaffolding option in my page mode selector. How do I disable these? Any help would be much appreciated.

Hi All,
I have a requirement where I do not want timewarp and scaffolding option in my page mode selector. How do I disable these? Any help would be much appreciated.

if you really want to do this, you can use javascript also like below to disable modes, create clientlib with cq.authoring.dialog category
(function($, $document) {
"use strict";
$(document).on("click", ".editor-GlobalBar-layerSwitcher", function(e) {
var field = $("button.js-editor-LayerSwitcherTrigger[coral-list-item]");
if (typeof field !== undefined) {
field.each(function() {
if($( this ).val() === "Scaffolding" || $( this ).val()==="Timewarp"){
$( this ).attr("disabled", true);
}
});
}
});
})($, $(document));
If you want to remove these two mode, play with javascript to remove selected elements from DOM.
Thanks
Arun
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.