Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
how to edit the message shown when deleting a document type, I want to show a list of content pages that use this document type before deleting it.
Hi,
You can do this with an angular interceptor. I wrote an article for skrift talking about this : https://skrift.io/articles/archive/changing-backoffice-functionality-without-changing-core-code/
You can also see it at work in my nexu package where I replace the content and media delete dialogs with my own.
Intercepting the delete view request and replacing it with my own view : https://github.com/dawoe/umbraco-nexu/blob/develop/Source/Our.Umbraco.Nexu.Core/Client/interceptor.js#L20
Custom delete view : https://github.com/dawoe/umbraco-nexu/blob/develop/Source/Our.Umbraco.Nexu.Core/Client/views/content-delete.html
Custom delete controller : https://github.com/dawoe/umbraco-nexu/blob/develop/Source/Our.Umbraco.Nexu.Core/Client/controllers/content-delete-controller.js
This controller inherites from a base delete controller ; https://github.com/dawoe/umbraco-nexu/blob/develop/Source/Our.Umbraco.Nexu.Core/Client/controllers/base-delete-controller.js
This base controller inherits the default umbraco controller. So I can reuse all the logic in there.
But you could also raise a feature request for it on https://github.com/umbraco/Umbraco-CMS/issues/new/choose
Maybe somebody will pick it up and create PR for it. That someone could be you.
Dave
Hi Dave, Thank you for your reply,
I've downloaded your package and its great, but when I delete a content page the message doesn't show the pages the linked to it?
did I miss anything?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
edit document type delete confirmation message
how to edit the message shown when deleting a document type, I want to show a list of content pages that use this document type before deleting it.
Hi,
You can do this with an angular interceptor. I wrote an article for skrift talking about this : https://skrift.io/articles/archive/changing-backoffice-functionality-without-changing-core-code/
You can also see it at work in my nexu package where I replace the content and media delete dialogs with my own.
Intercepting the delete view request and replacing it with my own view : https://github.com/dawoe/umbraco-nexu/blob/develop/Source/Our.Umbraco.Nexu.Core/Client/interceptor.js#L20
Custom delete view : https://github.com/dawoe/umbraco-nexu/blob/develop/Source/Our.Umbraco.Nexu.Core/Client/views/content-delete.html
Custom delete controller : https://github.com/dawoe/umbraco-nexu/blob/develop/Source/Our.Umbraco.Nexu.Core/Client/controllers/content-delete-controller.js
This controller inherites from a base delete controller ; https://github.com/dawoe/umbraco-nexu/blob/develop/Source/Our.Umbraco.Nexu.Core/Client/controllers/base-delete-controller.js
This base controller inherits the default umbraco controller. So I can reuse all the logic in there.
But you could also raise a feature request for it on https://github.com/umbraco/Umbraco-CMS/issues/new/choose
Maybe somebody will pick it up and create PR for it. That someone could be you.
Dave
Hi Dave, Thank you for your reply,
I've downloaded your package and its great, but when I delete a content page the message doesn't show the pages the linked to it?
did I miss anything?
is working on a reply...