Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...How to add/remove items from the navigation menu from inside my custom modules?How to add/remove items from the navigation menu from inside my custom modules?
Previous
 
Next
New Post
7/1/2009 8:38 PM
 

I have been hunting around trying to find out how to dynamically update the menu system from inside my custom modules.

For example, one of my modules is the DNNtree element, and then a user clicks on different items I would like to adjust the items that display on the menu of the website (outside my module).

I have been googling   SOLPART DYNAMICALLY UPDATING MENU and other terms but I have been unable to find reference to how this is accomplished.

Any pointers greatly appreocated (re. DNN 5.1 VS2008/3.5)

Thank you.

Brett

 
New Post
7/1/2009 9:22 PM
 

Not sure to fully understand what you are trying to accomplish... The menus are built to display the pages of your site. You can parametrize them through properties to specify which pages to show -- such as specifying to display pages under the current node -- but the data source of the menus are the pages of your site.

Most common scenario would be that when a user clicks on a link in your module, the user is redirected to another page, and the menu is automatically updated based on current page.

If you require the menu to be changed dynamically, you should probably drive this menu yourself (that is, create a specific implementation of the menu and add the possibility to dynamically change the items from outside).

In any case, we offer a ML solution that is free and comes with sources in which we hack around menus to dynamically remove some nodes of the menus. We have hacked around DNN core menus and most 3rd party menus. These sources could serve you as examples if you need. Search for "localization extensions" on Snowcovered to download for free.

 
New Post
7/1/2009 11:05 PM
 

That is most helpful.

Thank you !

Brett

 
New Post
7/1/2009 11:09 PM
 

Interesting question... You'd probably have to roll your own navigation provider that implements the IMC?

 
New Post
7/2/2009 12:57 AM
 

Why could I not just use AddTab() function from TabController ?   Would something like this below basically allow me to modify / edit / delete any item from the main navigation menu of the website from inside any module ?

 

Dim settings As DotNetNuke.Entities.Portals.PortalSettings = GetPortalSettings()
Dim tbString As String = ""
Dim tabId As Integer = settings.DefaultTabId()
Dim tC As DotNetNuke.Entities.Tabs.TabController
tC =
New DotNetNuke.Entities.Tabs.TabController()
Dim tabs As ArrayList
tabs =
CType(tC.GetTabsByParentId(tabId, settings.PortalId), ArrayList)

 

 

 

Dim tabNew As TabInfo = New TabInfo()
tabNew.TabName = "test"
tabNew.IsVisible = True

tabNew.IsDeleted = False
tabNew.StartDate = Now()
tabNew.PortalID = settings.PortalId
tabNew.Title = "TEST"
tabNew.Url = www.testurl.com

tC.AddTab(tab1)

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...How to add/remove items from the navigation menu from inside my custom modules?How to add/remove items from the navigation menu from inside my custom modules?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out