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.0Special module/page urlsSpecial module/page urls
Previous
 
Next
New Post
6/29/2006 12:24 PM
 

I'm looking to develop a module that is on one specific page yet when u click a link in that module a subpage is loaded much like how the forum system works on this site. 

http://www.dotnetnuke.com/tabid/795/Default.aspx is the same page as this page only that it shows different content.

http://www.dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/forumid/111/scope/threads/Default.aspx

Where would i retrieve the data like the forumid/111/scope/threads?

 
New Post
6/29/2006 4:03 PM
 
If I understand you correctly, you want to have one module with multiple view controls?   See this post:
http://www.dotnetnuke.com/Community/ForumsDotNetNuke/tabid/795/forumid/110/threadid/46342/threadpage/2/scope/posts/Default.aspx


EXCERPT:

After reviewing the way Scott McCulloch did the NewsArticles, I was able to recreate the handling of multiple view controls.  It is quite simple really.

1.  Create a default holding control (primary view control for the module).  This control will be used for all of the switching of view controls.  It has only one server control on it:

<code>
<asp:PlaceHolder id="plhControls" runat="Server" />
</code>

2.  Send a querysting variable to the tab to specify which view control to load.  Use the following code to reference the desired control:

<code>
Private m_controlToLoad As String

Private Sub ReadQueryString()
    If Not (Request("ControlType") Is Nothing) Then
        Select Case Request("ControlType").ToLower()
            Case "sales"
                m_controlToLoad = "SalesSummary.ascx"
            Case "orders"
                m_controlToLoad = "OrdersSummary.ascx"
            Case Else
                m_controlToLoad = "SalesSummary.ascx"
        End Select
    Else
        m_controlToLoad = "SalesSummary.ascx"
    End If
End Sub
</code>

3.  Load the control through code, as follows:

<code>
Private Sub LoadControlType()
     Dim objPortalModuleBase As PortalModuleBase = CType(Me.LoadControl(m_controlToLoad), PortalModuleBase)
     If Not (objPortalModuleBase Is Nothing) Then
          objPortalModuleBase.ModuleConfiguration = Me.ModuleConfiguration
          objPortalModuleBase.ID = System.IO.Path.GetFileNameWithoutExtension(m_controlToLoad)
          plhControls.Controls.Add(objPortalModuleBase)
     End If
End Sub
</code>

4.  Fire these two routines each time the page initializes:

<code>
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
     'CODEGEN: This method call is required by the Web Form Designer
     'Do not modify it using the code editor.
     InitializeComponent()
     ReadQueryString()
     LoadControlType()
End Sub
</code>

5.  In order to switch to another control, place this code in the desired event:

<code>
Response.Redirect(NavigateURL() + "&ControlType=orders")
</code>

Ahhh...now I have freedom to add as many view controls within a module as I need.  Scott, thank you very much for pointing out the way.

Vielen Dank!!
Ling


 
New Post
6/29/2006 4:11 PM
 
    That would work, yet I feel that it would not be as search engine friendly as dotnetnuke has it currently with it in separate fake folders.
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Special module/page urlsSpecial module/page urls


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