Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Help re:Custom Module with Multiple ControlsHelp re:Custom Module with Multiple Controls
Previous
 
Next
New Post
9/26/2008 3:22 PM
 

Hello everybody,

I've reached a bit of a stumbling block with custom module development and hope somebody may be able to shed a little light on the subject for me.

I've done a fair bit of research, but just can't seem to get it right...

The module is a simple item list control, which pushes to a item detail view control.

The problem is actually two fold...

I managed to get my module working with multiple controls using NavigateUrl to do the heavy lifting for generating an appropriate page call.  This works, but causes a shift from the site skin to the admin skin.  I tried switching the detail control from an Edit type to a View type, but with no luck.  I understand this is the expected behaviour (after a bit of research).

Since, I couldn't find a good example of how to force the skin to remain a non-admin skin, I followed the other common approach of building a top level dispatch module.

The problem I'm having is that although the dispatching module correctly shows the list when I enter the page, when I get pushed to the detail view (a URL with the correct parameters is generated) I find that not only is the detail module not shown -- but the dispatching module doesn't show.

Unfortunately, even though the URL is correct (I can see all the parameters), direct access (via rewritten or standard URL format) doesn't work either.

My reference for the dispatching module is at http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/110/threadid/46342/scope/posts/threadpage/2/Default.aspx

I've tried handing off via the list module via straight link (ie. constructed using String.format, NavigateUrl and a parameter array), via a dynamically created LinkButton, and also tried to tie to a server side event on the dynamically generated link (in the item list... which is a gridview), but nothing works... other than the skin remains the same.

I'm using the method described where the Page.Init injects the dynamically created view (list or detail) into a placeholder control... and my code doesn't differ significantly from that found in the referenced thread.

Has anybody got advice, or a minimal but complete working sample?

Any help is greatly appreciated!

 
New Post
9/26/2008 5:12 PM
 

For reference, please also find the code posted below (hope the moderation delay doesn't cause any confusion...):

This is the simplest version of my dispatch wrapper...

---

Imports DotNetNuke
Imports System.Web.UI

Imports DotNetNuke.Entities.Modules

Namespace Modules.MyModuleName


    Partial Class View
        Inherits Entities.Modules.PortalModuleBase

        Private Const DEFAULT_CONTROL As String = "ViewList"

        Private Sub Page_Init(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Init
            LoadControlByName(GetControlName())
        End Sub
       
       
       
        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

            If IsPostBack Then

                'TODO: ???

            End If

        End Sub
       
       
       
        Public Function GetControlName() As String
       
            Dim ctrlName As String = Request.Params("cn")
            Dim controlToLoad As String = "ViewList.ascx"
       
            Try

                If (ctrlName IsNot Nothing) Then
                    If ctrlName.ToLower = "viewdetail" Then
                        controlToLoad = "ViewDetail.ascx"
                    End If
                End If               
           
            Catch ex As Exception
                Exceptions.ProcessModuleLoadException(Me, ex)
            End Try
           
            Return controlToLoad
       
        End Function
       
       
       
        Public Sub LoadControlByName(ByVal ctrlName As String)
       
            Dim pmb As PortalModuleBase = CType(LoadControl(ctrlName), PortalModuleBase)
           
            If (pmb IsNot Nothing) Then
                pmb.ModuleConfiguration = ModuleConfiguration
                pmb.ID = System.IO.Path.GetFileNameWithoutExtension(ctrlName)
               
                phContent.Controls.Add(pmb)
            End If
       
        End Sub
       
    End Class

End Namespace
 

 
New Post
9/29/2008 11:23 AM
 

In the interests of closing this...

I didn't find the solution I was looking for, but did implement a more appropriate admin skin and am relying on the built-in behaviour to handle things.

It's not perfect, but it works.

Should somebody come across this thread with a quick pointer or two, I'd still love to resolve the issue in a more definitive fashion.

Thanks and best regards to the DNN community!

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Help re:Custom Module with Multiple ControlsHelp re:Custom Module with Multiple Controls


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out