How does EPiServer handle links when deleting a page? Does EPiServer clean up potential broken links?
With the standard EPiServer delete function there is no link cleanup, which means you can easily end up with broken links. Now this is something that I thought would be easy in EPiServer, as the standard function even tells you what the linked pages are when you try to delete. So, why is there no ability to clean up the links before delete? Answer, I don't know, but maybe it will be coming in a future version :)
Well I want it now! So this is the driver behind my want to create an advanced delete function, that gives the user the ability to clean up links before a page is deleted.
I have started work on a prototype, and it's working quite well so far. My delete page plugs into EPiServer using the "alternate files" function (a function that allows you to implement your own version of an admin or edit mode function). This means my advanced delete overrides the standard delete and is available through the standard menus.
If a link to the selected page is detected, then some options are supplied to either remove the links or replace the links. And for the web admins out there, I have added an option so you can force the user to clean up all links, before the page can be deleted (you know you want the power).
Here are a couple of screenshots from my current prototype:
It works okay at the moment but there are a few things I'd like to improve on, such as
- Better detection of linked pages (works well at the moment but a little problem with caching in EPiServer maybe?).
- Add override function for site Administrators.
- Better access denied handling for when users try to cleanup links on a page they don't have access to.
No comments:
Post a Comment