Search code examples
c#asp.netdotnetnuke

How do i get all public pages in DotNetNuke?


I am new to DNN web sites, and would like to display a list of the root level pages (Home, Contact Us, etc..) at the top of my skin. Right now I have:

TabController.GetPortalTabs(0,-1, false, "", false, false, false, true,false);

Feeding my repeater which displays the links. However, when I am logged in to edit the pages, the navigation grows to include all admin level pages as well and breaks my design. Is there a way to get just the public pages to show even when I am logged in?


Solution

  • Used the help from above to get here:

    List<DotNetNuke.Entities.Tabs.TabInfo> tabs = TabController.GetTabsByParent(-1, 0).FindAll(
             delegate(DotNetNuke.Entities.Tabs.TabInfo tab)
             {
                 return tab.IsVisible && !tab.IsDeleted;
             }
            );