Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 12/10/2006 10:26 PM by  Peter Donker
Calling a method from Module action items list
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
abhi
New Member
New Member
Posts:3


--
12/07/2006 5:31 PM
    Hello,
    I'm adding a new Module action item to the DMX module called Delete apart from having it in the dmx:toolbar section. And i want it to point to the original method Hard Delete in PortalModuleBase.vb .But i'm not sure how to trigger any sort of event method from
    Actions.Add(GetNextActionID, "Delete", "Delete", "", "", "", True, DotNetNuke.Security.SecurityAccessLevel.Edit, True, False) in dispatch.ascx.vb

    Any suggestions in this regard would be greatly appreciated.
    Thanks.
    Peter Donker
    Veteran Member
    Veteran Member
    Posts:4536


    --
    12/10/2006 5:52 PM
    Hi,
    I'm not sure exactly what you're trying to accomplish, but maybe this will help you:
    The toolbar buttons do not fall under DNN's module action management as it is too simple for DMX. Remember that in DMX you set permissions for every single content item and in DNN just for the whole module. So the button visibility and action is handled by DMX. This means it needs to be defined in the DMX_Extensions table. Here you need to specify the following:
    AccessRights: a semi-colon separated list of role id's for those who may see the button.
    Addon: a kex to the DMX_Addons table. You can use 'Core' if you like
    ControlToLoad: specify the ascx to load when clicking this button
    ExtensionKey: Starts with 'Command.', then 'Single' for a detail view and 'Batch.' for a button on the collection view that can act on multiple docs at the same time. You finish with some unique key. Eg: Command.Single.MailLink
    Icon16: points to the icon. Note that DMX adds .over.gif etc to this text
    EntryTypes: semicolon separated list of entry types on which the button may act. Use 'File' to act on all file types for instance.
    ResourceFile: points to resource file where the extension key can be translated to a text to show under the button.
    That should hook you into DMX. Note that the list is buffered in cache so any changes will need to be followed by an IIS restart or some other way to empty the cache.
    Let me know how it goes or if you have any questions.
    abhi
    New Member
    New Member
    Posts:3


    --
    12/10/2006 7:03 PM

    Thanks Peter for a very informative reply.

    Actually, i'm trying to avoid showing "Hard Delete" icon in the menu bar on DMX and want to put Hard Delete as one of the Action Items in the DMX module(in Dispatch.ascx.vb using Actions.Add()). So behind the scenes i would trigger an event on this action item click and basically the event handler would call the Hard Delete method from PortalModuleBase.ascx.vb. But i'm not able to figure out as to how call an event handler on the action item click event.

     I guess its more of a DNN question than a DMX which i just realised yesterday. But if you could still highlight an approach, i would really appreciate that.

    Sorry for not putting a DMX relevant question in the forum. I'm new to DNN stuff.

    Regards,
    Abhishek.

     

    Peter Donker
    Veteran Member
    Veteran Member
    Posts:4536


    --
    12/10/2006 10:26 PM
    Hi Abishek,
    I'm not entirely sure you can do this. I only use the Module Actions to load in ascxs as is done in all cases I've seen so far. You might have a look at the way in which DNN handles the menu events for moving a module left/right/up/down. That is more like the kind of hook-up you want I think.
    Peter
    You are not authorized to post a reply.