Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Remove the "Delete from draft site" button


Go to End


2 Posts   1604 Views

Avatar
DeklinKelly

Community Member, 197 Posts

3 September 2009 at 1:12am

I use the following code to remove delete and publish buttons. How do I remove the "Delete from draft site" button?

<?php

class GlobalContent extends SiteTree {

	function canDelete(){
		return false;
	}
	function canPublish(){
		return false;
	}
}

?>

Avatar
steve_nyhof

Community Member, 224 Posts

19 January 2010 at 3:08am

I would also like to know this. I have setup some pages as Page Folders, that are not published, but have pages inside (or one level nav down) that will be published.

These main unpublished folder type pages need to be unpublished, but never deleted.

Anyone run into the answer to remove the Delete from draft site button?