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.

Data Model Questions /

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

Checking if the page being deleted is a draft


Go to End


1557 Views

Avatar
MarcusDalgren

Community Member, 288 Posts

2 July 2009 at 12:19am

Is this possible?

I set up a couple of onBeforeDelete() functions to make sure the relationships don't brake when the page is deleted.
However I only want this to run if the page is deleted "for real" not when it's deleted from the draft site.

Is there some easy way to check if the page is a draft?

Kindly, Marcus.