Skip to main content
Level 2
Aug 3, 2023 8:05 AM UTC

How to disable the move button if the page is published.

I tried by overlaying the siteadmin.action.js and adding a condition in the move option in the siteadmin-> action. But the overlayed function is not working.

Even the existing singleSelection is also not working, when I change it into anysleection, those changes are also not working.

where Do I need to check? how to confirm whether my overlay is working or not?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

5 replies

lukasz-m
Community Advisor
Community Advisor
Aug 3, 2023 10:37 AM UTC

Hi @nirmal_kumar1,

I think you should rather use Render Condition feature, to achieve your goal.

You can check if you can utilize any existing Render Condition:

Or create custom one, here are some nice examples:

Last but not least in terms of applying Render Condition on Move button you will have to overlay this path /libs/wcm/core/content/sites/jcr:content/actions/selection/movepage which is responsible for showing Move button on Sites view level.

Translate
Level 2
Aug 3, 2023 11:24 AM UTC

Hi @lukasz-m, thanks for your quick suggestions.

 

Still  I have a question, is there any way, in which,

We can check whether the page is published and disable the move button on selecting the page.

As like the (activeSelectionCount:"single") property which allows only one page to be selected and hide the move button when we select multiple pages.

Do we have custom property to check whether the page is published?

Or where we can write the custom condition to check the page is published or not and enable/disable the move button accordingly?

 

And also this is not specific for any user group, all the user should have the same behavior

Translate
New Member
Apr 16, 2024 2:56 PM UTC

Hi @nirmal_kumar1 , were able to enable/disable the move button ? 

Translate
kautuk_sahni
Level 9
May 16, 2024 11:18 AM UTC

@nirmal_kumar1 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Translate
Kautuk Sahni