//add following using derectives to your code file
//using DotNetNuke.Entities.Tabs;
//using System.Collections.Generic;
TabController tController = new TabController();
Dictionary<int,TabInfo> tabs = tController.GetTabsByPortal(PortalId);
IDictionaryEnumerator hs = tabs.GetEnumerator();
while (hs.MoveNext())
{
TabInfo tInfo = (TabInfo)hs.Value;
if (!tInfo.IsAdminTab && tInfo.IsVisible)
{
//TODO process tab operation from here
}
}
Monday, January 5, 2009
DotNetNuke Code Snippet: Get All Portal Tabs
Subscribe to:
Post Comments (Atom)
Where is hs defined?
ReplyDeleteThanks, just updated code to include hs
ReplyDelete