Handler for module settings changed

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.
3/11/2010 1:47:52 PM
Gravatar
Total Posts 2

Handler for module settings changed

Hi,

First of all, congratulations on what is an incredibly well thought out and implemented solution.  I have tried a good few other similar products and found them lacking or difficult to use, but warmed to MojoPortal immediately because it is easy to use and

I have a particular extension feature that I am currently coding and I would like to be able to fire some code to perform configuration of the feature rss feed when the module settings are altered. 

I store all of the configuration settings for the module using the FeatureDefinitions, and the feed is disabled by default.  In order to setup the feed, I currently have to change the module settings, and then wait until an item is added into the feature to be able to configure the feed from the feature edit page. 

Is there a way to have custom code run when module settings are altered (I was thinking there might be something in the same manner as the other providers for UserSignIn, IndexBuilders etc)?

Many thanks

3/12/2010 1:54:57 PM
Gravatar
Total Posts 18439

Re: Handler for module settings changed

Hi,

Module Settings is a developer convenience for storing and retrieving key value pairs. I do not see any benefit to having events and providers to respond to events based on changes in module settings, it is just a storage mechanism like a dictionary that you can use if you want to and is convenient for many features because you don't need to create your own table or UI to manage settings there, but it is not meant to be a one size fits all solution for every need.

If you need more complex solution you can implement your settings in your own table and create your own business classes or pages with events. For example in WebStore I felt I needed more than what module settings provides so I implemented a StoreSettings on it's own Store table and a StoreSettings.aspx page to manage the settings. So far I have not needed it but I could implement a Store changed event if I needed it.

Hope it helps,

Joe

3/19/2010 7:55:38 AM
Gravatar
Total Posts 2

Re: Handler for module settings changed

Hi Joe,

Thanks for the advice - I see your point regarding the Module Settings.  I hadn't looked at the code for the WebStore as it is not something I need to implement, so thanks for the pointer there too, it is just what I was looking for.

Please, enjoy a beer on me tonight!

3/20/2010 6:53:25 AM
Gravatar
Total Posts 18439

Re: Handler for module settings changed

Thanks for the beer! Much appreciated.

Cheers,

Joe

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