Protected Function GetSkinContainerSrc() As String
Dim strReturn As String = String.Empty
Dim objTabs As New TabController()
Dim objTab As DotNetNuke.Entities.Tabs.TabInfo = objTabs.GetTab(Me.TabId)
'Get the skin source
'Check the tab settings first.
Dim strSkin As String = objTab.SkinSrc
If strSkin = String.Empty Then
'Not in the tab settings, check the portal
strSkin = PortalSettings.PortalSkin.SkinSrc
End If
'Cleanup the string if it doesn't have the global/local information.
If strSkin <> String.Empty Then
If strSkin.IndexOf("/Portals/") >= 0 Then
If strSkin.IndexOf("/Portals/_default/") >= 0 Then
strSkin = "[G]" & strSkin.Substring(strSkin.IndexOf("/Skins/") + 1)
Else
strSkin = "[L]" & strSkin.Substring(strSkin.IndexOf("/Skins/") + 1)
End If
End If
strReturn += "&SkinSrc=" & Server.UrlEncode(strSkin.Replace(".ascx", String.Empty))
End If
'Get the container source
'Check the module settings for the container first.
Dim strContainer As String = Me.ModuleConfiguration.ContainerSrc
If strContainer = String.Empty Then
'Not in the module, check the tab.
strContainer = objTab.ContainerSrc
If strContainer = String.Empty Then
'Not in the tab, check the portal
strContainer = PortalSettings.PortalContainer.SkinSrc
End If
End If
'Cleanup the string if it doesn't have the global/local information.
If strContainer <> String.Empty Then
If strContainer.IndexOf("/Portals/") >= 0 Then
If strContainer.IndexOf("/Portals/_default/") >= 0 Then
strContainer = "[G]" & strContainer.Substring(strContainer.IndexOf("/Containers/") + 1)
Else
strContainer = "[L]" & strContainer.Substring(strContainer.IndexOf("/Containers/") + 1)
End If
End If
strReturn += "&ContainerSrc=" & Server.UrlEncode(strContainer.Replace(".ascx", String.Empty))
End If
Return strReturn
End Function
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (0)