Search code examples
dotnetnuke

How to get name & link of parent page in DNN


I want to have a link on children pages that is not only the name of the parent page, but also links to the parent page in DNN.


Solution

  • Use this in your skin ascx file

    <a href="<%= ((DotNetNuke.Entities.Tabs.TabInfo)PortalSettings.ActiveTab.BreadCrumbs[ PortalSettings.ActiveTab.Level - 1 ]).FullUrl %>">
    <%= ((DotNetNuke.Entities.Tabs.TabInfo)PortalSettings.ActiveTab.BreadCrumbs[ PortalSettings.ActiveTab.Level - 1 ]).TabName %>
    </a>
    

    Note: this is for a C# skin.