Need Direction, DNN2 Host Tabs

Last post 05-17-2004 5:44 AM by DevilDog74. 1 replies.

Sort Posts:

  • Need Direction, DNN2 Host Tabs

    05-07-2004, 1:32 PM
    • Participant
      1,506 point Participant
    • DevilDog74
    • Member since 05-13-2003, 11:25 AM
    • Denver, CO
    • Posts 303
    I was wondering if someone could point me in the right direction to being able to get/find a collection of host tabs, similar to the DesktopTabs collection exposed by PortalSettings.

    I just want to get a list of them and their properties, e.g. TabStripDetails, etc.

    Thanks in advance
    Did the chicken really cross the road, or did the road move beneath the chicken?
  • Re: Need Direction, DNN2 Host Tabs

    05-17-2004, 5:23 AM
    • Participant
      1,506 point Participant
    • DevilDog74
    • Member since 05-13-2003, 11:25 AM
    • Denver, CO
    • Posts 303
    For anyone that might want to know how to do this, here is how:

    Find all tabs on a given tab:

    Public Shared Function MenusOnCurrentTab(ByVal portalSettings As DotNetNuke.PortalSettings, ByVal CurrentTabID As Integer) As ArrayList
    Dim objTabs As New TabController
    Dim returnTabs As New ArrayList
    Dim tabs As ArrayList = objTabs.GetTabsByParentId(CurrentTabID)
    Dim i As Integer
    Dim newTab As DotNetNuke.TabStripDetails

    For i = 0 To tabs.Count - 1
    Dim objTabInfo As DotNetNuke.TabInfo = CType(tabs(i), DotNetNuke.TabInfo)
    If objTabInfo.IsVisible = True AndAlso objTabInfo.IsDeleted = False Then
    newTab = New TabStripDetails
    newTab.TabName = objTabInfo.TabName
    newTab.TabId = objTabInfo.TabID
    returnTabs.Add(newTab)
    End If
    Next

    Return returnTabs

    End Function


    Find all host tabs:

    Public Shared Function HostMenus(ByVal portalSettings As DotNetNuke.PortalSettings) As ArrayList
    Dim objTabs As New TabController
    Dim returnTabs As New ArrayList
    Dim tabs As ArrayList = objTabs.GetTabsByParentId(portalSettings.SuperTabId)
    Dim i As Integer
    Dim newTab As DotNetNuke.TabStripDetails

    For i = 0 To tabs.Count - 1
    Dim objTabInfo As DotNetNuke.TabInfo = CType(tabs(i), DotNetNuke.TabInfo)
    If objTabInfo.IsVisible = True AndAlso objTabInfo.IsDeleted = False Then
    newTab = New TabStripDetails
    newTab.TabName = objTabInfo.TabName
    newTab.TabId = objTabInfo.TabID
    returnTabs.Add(newTab)
    End If
    Next

    Return returnTabs
    End Function



    Find all admin tabs


    Public Shared Function AdminMenus(ByVal portalSettings As DotNetNuke.PortalSettings) As ArrayList

    Dim returnTabs As New ArrayList
    Dim newTab As DotNetNuke.TabStripDetails

    Dim tsd As DotNetNuke.TabStripDetails
    For Each tsd In portalSettings.DesktopTabs
    If tsd.ParentId = portalSettings.AdminTabId Then
    returnTabs.Add(tsd)
    End If
    Next

    Return returnTabs
    End Function


    It seems to work for me anyway. Enjoy....
    Did the chicken really cross the road, or did the road move beneath the chicken?
Page 1 of 1 (2 items)