In Silverstripe if you right click on a page in Sitetree you have the ability to duplicate either a single page or a page and all its children.
We have found that users occasionally duplicate pages with large numbers of children and would like to prevent this by either removing the 'This page and subpages' option or by restricting it to admin users only.
How can this be achieved?
Looking at the code in cms/javascript/CMSMain.Tree.js
in SilverStripe 3.4 it doesn't look like there is currently a way to switch this off.
One option we have is to add some CSS to the CMS to hide the menu item for everybody:
mysite/css/cms.css
#vakata-contextmenu a[rel="duplicate"] + ul > li:last-child {
display: none;
}
To enable the cms.css
file we add the following line to our config.yml
mysite/_config/config.yml
LeftAndMain:
extra_requirements_css:
- 'mysite/css/cms.css'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With