활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
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
조회 수
답글
좋아요 수