OK - Now I've done it.
I've stared myself blind at this little tiny problem and I'm pretty sure that the solutions is MUCH more simple than I'll ever imagine.
Here's the Purpose:
I've created a set of custom modules (lets call them "module 1, 2 and 3"). These modules have I placed on "Tab 1".
Then I created a new module (for ease we'll call it "Module 4".)
"Module 4" has been placed on "Tab 2"
Now here's the thing : In "Module 4", I need to set a custom setting which should be the moduleID of "Module 1", which is placed "Tab 1".
And here's the Problem:
Now, how do I get the tabs and modules in the active portal ? I can figure out how to get the modules on the active tab, but not on the other tabs?
Oh, and for ease sake, I'll post my code here (dont be alarmed, I'm only just getting to know the DNN framework :-) )
Dim myArray As ArrayList = GetPortalTabs(PortalId, False, False, False, False, False)
Dim myModInf As DotNetNuke.Entities.Modules.ModuleInfo
'Dim myTabCont As DotNetNuke.Entities.Tabs.TabController = New TabController
Dim iCount, iCount2 As Integer
For iCount = 1 To myArray.Count
Dim myTabInfo As DotNetNuke.Entities.Tabs.TabInfo = CType(myArray(iCount - 1), DotNetNuke.Entities.Tabs.TabInfo)
Dim myArray2 As System.Collections.ArrayList = myTabInfo.Modules '(iCount, PortalId, True).Modules
[^^^^^^^^^^^ This ArrayList is Empty, even though the tab has 3 modules ]
For iCount2 = 1 To myArray2.Count
myModInf = CType(myArray2(iCount2 - 1), DotNetNuke.Entities.Modules.ModuleInfo)
Dim myListItem As ListItem = New ListItem
myListItem.Value = myModInf.ModuleID
myListItem.Text = myTabInfo.TabName & "-" & myModInf.FriendlyName
drpPackagesModules.Items.Add(myListItem)
drpSystemsModules.Items.Add(myListItem)
Next
Next
And Like I said, the solutions is probably MUCH more simple than I can imagine. ANY help will be greatly appreciated