Monday, January 5, 2009

DotNetNuke Code Snippet: Get All Portal Tabs

//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
}
}

2 comments:

Please add your valuable comments about this post if it helped you. Thanks

Popular Posts