How to disable the move button if the page is published. | Community
Skip to main content
Level 2
August 3, 2023

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

  • August 3, 2023
  • 2 replies
  • 1225 views

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.

2 replies

lukasz-m
Community Advisor
Community Advisor
August 3, 2023

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.

Level 2
August 3, 2023

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

New Member
April 16, 2024

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

kautuk_sahni
Community Manager
Community Manager
May 16, 2024

@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.

Kautuk Sahni