How can I handle to delete everything related to my developed new content?

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
10/14/2009 9:04:11 AM
Gravatar
Total Posts 4

How can I handle to delete everything related to my developed new content?

How can I handle to delete everything related to my developed content in the Content Manager?

I have developed a new Feature for my site which is creating some XML files. Everything works well but when I delete the Content in the Content Manager, the mentioned XML files will not be deleted and still remain in my site.

I would be grateful if someone tells me how I can solve this problem in order to delete every thing when I delete the Content in the Content Manager.

Regards,

Pouyan Paryas

 

10/14/2009 11:38:00 AM
Gravatar
Total Posts 550

Re: How can I handle to delete everything related to my developed new content?

Hi Pouyan,

When content instances aka modules are deleted from the content catalog we need a feature specific way to delete content for the feature that is associated with the deleted module . ContentDeleteHandlerProvider is a base class for features to implement.The FeatureDefinition.DeleteProvider must correspond to the name of the feature specific implementation, so that the system can invoke the correct ContentDeleteHandlerProvider.

So:

1-You can create a yourfeatureContentDeleteHandler calss that inherits from ContentDeleteHandlerProvider.

2-Create a yourfeatureContentDeleteHandler.confg file in you feature setup/ProviderConfig/contentdeletehandlers folder with following content:

<?xml version="1.0" encoding="utf-8" ?>

<ContentDeleteProviders>

<providers>

<add name="yourfeatureContentDeleteHandler"

type="yourfeaturenamespace.yourfeatureContentDeleteHandler, yourfeatureassemblyname"

description="Deletes related content when a module is deleted" />

</providers>

</ContentDeleteProviders>

 

For more details see setup/ProviderConfig/webstoredeletehandler.config and Helpers/WebStoreContentDeleteHandler.cs in WebStore.UI Projecr.

Hope Helps

Asad

10/14/2009 12:53:10 PM
Gravatar
Total Posts 4

Re: How can I handle to delete everything related to my developed new content?

با تشکر فراوان

Thank you Asad,

I am working on it and if I have another question, I will call you again.

Regards

 

Pouyan

You must sign in to post in the forums. This thread is closed to new posts.