0
votes

I'm new to DotNetNuke module develoment. Currently I'm working on a Contact Address Book module for DNN 6 and I would like to show a list when a user logs in and some settings to add, delete and change contacts on the Manage section (left upper corner in Edit view).

I have no idea how to archieve this, so far, I created two modules. One to display all contacts and other to add, edit, update and delete contacts.

My "tutor" gave me this link http://www.dotnetnuke.com/Resources/Wiki/Page/IActionable.aspx but i have no idea how to implemennt it since i started with asp.net a week ago ^^

Can anybody point me to a "For dummies" solution??

How can I add special settings to my dnn module (using vb)?

2

2 Answers

0
votes

IActionable lets you add 'commands' to the module, so basically you can add an actionable that calls some javascript or redirects to some url. This url with the right parameters can load on execution time some dnn user control to display for example your settings.

You should download the visual studio DNN templates. There's a template to build modules and it helps creates a full functional module with actionable commands and a settings dnn user control.

0
votes

I quess the best for you is to take a look at one of the existing modules and how they implement this. You can download a module template here. This one is for C# developers, but can help you figure out how things work. A good start for module development is also located here, i highly recommend reading it as it contains the idea how modules should be developed to work correctly.

As for IActionable, take a look for example in View.ascx.cs (which implements the interface), there is an "Edit Module" action added to the module action list:

    public ModuleActionCollection ModuleActions
    {
        get
        {
            ModuleActionCollection Actions = new ModuleActionCollection();
            Actions.Add(GetNextActionID(), Localization.GetString("EditModule", this.LocalResourceFile), "", "", "", EditUrl(), false, SecurityAccessLevel.Edit, true, false);
            return Actions;
        }
    }

To add more actions to the "Manage" menu, simply add new action to the Actions collection, as it is in an example above.

Specifically in your case, there is no need to create 2 modules, everything can be handled within one module with multiple module controls (view.ascx, edit.ascx, your_name.ascx, settings.ascx), which are displayed based on actions as described above.

Regarding settings for your module, this is also explained in the module tutorials above. Settings.ascx is a way to go, just add your own controls to the Settings.ascx control and implement saving/loading of these settings in your YourModuleNameSettingsBase.cs class. The module template does contain some commented out methods which are doing just what you need.