tags:

views:

79

answers:

2

ok i have created a picture gallery module in the left bar , there is a page viewpicturegallery.ascs . on clicking any image i want it details to open in the content pane in the middle . how would i do it.

can some tell me the process? i would made a new page or new module or what? for the details in the middle

+1  A: 

Short answer: use multiple DNN modules and communicate between them via querystring parameters, postbacks or IModuleCommunicator. Depending on your requirements, the details view may be possible to implement using a Text/HTML module and client-side tools like jQuery and plugins only?

More details on using multiple interconnected DNN modules:

You can define multiple modules in the .dnn manifest section. This way, each interconnected submodule is part of the same install package, but you'll only have one visible module in the in the control panel's "Modules" dropdownlist. Adding this composite module to a page will add all the submodules, but you can remove any one of them independently of the others.

You should be aware that each submodule that directly inherits PortalModuleBase will have its own Settings object. If you want to share settings, you'll have to inherit from a shared parent ascx that inherits PortalModuleBase or write a function to read settings from another module in the same page (having the same ModuleID helps here).

Communication between modules can be based on querystring parameters, which is recommendable for opening a details view so that you can open it even if the gallery module weren't present. PostBacks let you use UpdatePanel, though. Modules in the same page can also use IModuleCommunicator interface for event-based communication. For example, I use an event calendar module with a "month view datepicker" module and a "list view of events" module. List view module communicates active days to the monthview via IModuleCommunicator. This way I can emphasize the active days with a boldface font in the datepicker. For more details on IModuleCommunicator, see Rafe Kemmis's blog post.

mika
Ok so u are confirming there is no way to build something like that with pages in the same module,So my aaproach for building module would be multiple modules?
mazhar kaunain baig
Yes, every page (ascx control) in a module is rendered in the same container. If you want to have the gallery control in a different container from the details view control, you'll need at least two module instances in the same DNN page.
mika
That's not correct by the way, you can create multiple definitions of the module and that way you can display more than a single view for a single module.
lakhlaniprashant.blogspot.com
Sorry for not being clear enough. Every ascx in a single module definition (<module> section in a .dnn manifest) will open in a the same container. I think you cannot override this. But you can have multiple module definitions in a manifest. This is what I meant with "submodules".
mika
+1  A: 

here are some steps you can achive it:

  1. create two controls in a single module for showing images and showing details for a single image and create two different definitions, each having a default view control as the one you want to show.

    when you install the module in the page, it will show both definition controls in content page, you can re-arrange them in whatever panes you want.
    1. search for inter module communication in dotnetnuke and grab a sample from net
    2. you will find that there are two module definitions participating in the communication. Your list control will be the IModuleCommunication and your details view will be your IModuleListner

That's how you can achieve the things you want.

Please tell me if you have any other questions.

lakhlaniprashant.blogspot.com