この会話は、活動がないためロックされています。新しい投稿を作成してください。
この会話は、活動がないためロックされています。新しい投稿を作成してください。
Hi All,
Can you please help how to hide Deactivate Page option from Side kick? I could able to do it from Site admin but could not able to get rid of this.
Thanks,
Phani
解決済! 解決策の投稿を見る。
表示
返信
いいね!の合計
phanirajkumarb74317693 wrote...
Hello Kautik, also how the javascript gets invoked in the above provided code? Do we need to call it from any component or?
Hi
You will notice that the client library has category of “cq.widgets”. Using this category means its loaded with all of CQ’s standard widgets. No extra includes needed in the component!!
Reference article :- http://www.adamcancode.com/adobe-cqaem-custom-widgets/
~kautuk
表示
返信
いいね!の合計
Please have a look at this community article:-
Link:- http://experience-aem.blogspot.in/2014/03/disable-sidekick-activate-deactivate.html
1) Code a servlet apps.experienceaem.sidekick.GetUserGroups to return the logged-in user groups.
2) Login to CRXDE Lite, create folder (nt:folder) /apps/skdisable
3) Create clientlib (type cq:ClientLibraryFolder) /apps/skdisable/clientlib and set a property categories of String type to cq.widgets
4) Create file ( type nt:file ) /apps/skdisable/clientlib/js.txt, add the following
disable.js
5) Create file ( type nt:file ) /apps/skdisable/clientlib/disable.js, add the following code
(
function
(){
if
( ( window.location.pathname ==
"/cf"
) || ( window.location.pathname.indexOf(
"/content"
) == 0)){
var
SK_INTERVAL = setInterval(
function
(){
var
sk = CQ.WCM.getSidekick();
if
(sk && sk.panels){
clearInterval(SK_INTERVAL);
$.ajax({
url:
'/bin/experienceaem/getgroups'
,
dataType:
"json"
,
type:
'GET'
,
async:
false
,
success:
function
(data){
data = data[CQ.User.getCurrentUser().getUserID()];
if
(data.indexOf(
"administrators"
) !== -1){
return
;
}
var
pagePanel = sk.panels[
"PAGE"
];
var
buttons = pagePanel.findBy(
function
(comp){
return
comp[
"name"
] ==
"PUBLISH"
|| comp[
"name"
] ==
"DEACTIVATE"
;
}, pagePanel);
CQ.Ext.each(buttons,
function
(button){
button.setDisabled(
true
);
});
}
});
}
}, 250);
}
})();
~kautuk
表示
返信
いいね!の合計
you can skip point 1 also, but then you can do it like.
//
if(CQ.User.getCurrentUser().hasPermissionOn("replicate", [CQ.WCM.getSidekick().getPath()])!=true){
if(sk && sk.panels){
clearInterval(SK_INTERVAL);
var pagePanel = sk.panels["PAGE"];
var buttons = pagePanel.findBy(function(comp){
return comp["name"] == "PUBLISH" || comp["name"] == "DEACTIVATE";
}, pagePanel);
CQ.Ext.each(buttons, function(button){
button.setDisabled(true);
});
}
表示
返信
いいね!の合計
Thank you Kautuk,
Can't we hide it from Useradmin like a particular usergroup can't see this option(Deactivate Page)? This option was not there in CQ 5.5 but is seen in 6.2
表示
返信
いいね!の合計
phanirajkumarb74317693 wrote...
Thank you Kautuk,
Can't we hide it from Useradmin like a particular usergroup can't see this option(Deactivate Page)? This option was not there in CQ 5.5 but is seen in 6.2
I am not sure about it.
Let me ask this with internal people and then get back to you.
~kautuk
表示
返信
いいね!の合計
Hello Kautik, also how the javascript gets invoked in the above provided code? Do we need to call it from any component or?
表示
返信
いいね!の合計
phanirajkumarb74317693 wrote...
Hello Kautik, also how the javascript gets invoked in the above provided code? Do we need to call it from any component or?
Hi
You will notice that the client library has category of “cq.widgets”. Using this category means its loaded with all of CQ’s standard widgets. No extra includes needed in the component!!
Reference article :- http://www.adamcancode.com/adobe-cqaem-custom-widgets/
~kautuk
表示
返信
いいね!の合計