开发者

Dotnetnuke menu custom root

开发者 https://www.devze.com 2022-12-08 06:58 出处:网络
Is there anyway to use the built-in DNN Menu module to display a menu based at a different root node other than the current tab node?

Is there anyway to use the built-in DNN Menu module to display a menu based at a different root node other than the current tab node?

Given the following structure:

Page1
-child1_1
-c开发者_JAVA技巧hild1_2
Page3
Page2(hidden)
-child2_1
-child2_2

In this scenario I will be having 2 menus on this skin. One will be normal navigation based off of the current node and the other will be a set of 'static' links to pages located outside the current node.

When on Page1 the normal navigation will show Page1, Page3 and the children of Page1 nested under Page1. The 'static' links will use 'Page2' as their root and will show child2_1 and child2_2.


In case anyone needs the answer to this, it is possible to do this using the dnn:NAV control:

<dnn:NAV runat="server" ID="dnnNAV" ProviderName="DNNMenuNavigationProvider" IndicateChildren="false" PopulateNodesFromClient="true" ControlOrientation="Horizontal" StartTabId="66" Level="Child" />
  • The StartTabId is the "root node" of the menu.
  • Level="Child" tells DNN to get the child tabs of the StartTabId. Use Level="Same" if you want to get tabs on the same level as the StartTabId.


I cannot understand your question at all. I don't know what you mean by "root node" or "tab node". I'm going to re-ask it based on what I think you mean and answer that question.

If you want to use the DNN menu to link to static pages, that's easy enough. To do this, Add a new Page (using Control Panel / Add). Complete the "Basic Settings" for the page, then under "Advanced Settings" the last option allows you to specify a URL, Page, or File for this page. You probably want "URL". Enter the URL and click "Update".

The menu item will now redirect to the link specified.

0

精彩评论

暂无评论...
验证码 换一张
取 消