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.

Archive /

Our old forums are still available as a read-only archive.

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

Deleting an associated page


Go to End


980 Views

Avatar
Alix

Community Member, 1 Post

15 May 2008 at 1:05pm

I've got some code that moves archives some pages and when these are archived then the associated page needs to be deleted. I can get the associated page to be deleted from Live using delete_by_id but not from Staging.

It looks like using the delete method of the DataObject should be the answer but I'm not sure how to implement this. Has anyone else done anything similar or have any ideas??