javascript - Remove 'Duplicate this page and subpages' functionality in Silverstripe -
in silverstripe if right click on page in sitetree have ability duplicate either single page or page , children.
we have found users duplicate pages large numbers of children , prevent either removing 'this page , subpages' option or restricting admin users only.
how can achieved?
looking @ code in cms/javascript/cmsmain.tree.js
in silverstripe 3.4 doesn't there way switch off.
one option have add css cms hide menu item everybody:
mysite/css/cms.css
#vakata-contextmenu a[rel="duplicate"] + ul > li:last-child { display: none; }
to enable cms.css
file add following line our config.yml
mysite/_config/config.yml
leftandmain: extra_requirements_css: - 'mysite/css/cms.css'
Comments
Post a Comment