How to get name & link of parent page in DNN

时间:2017-04-06 17:03:14

标签: dotnetnuke

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.

1 个答案:

答案 0 :(得分:4)

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.