Products

Solutions

Resources

Partners

Community

About

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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Setting Tab OrderSetting Tab Order
Previous
 
Next
New Post
11/19/2008 6:34 PM
 

I am writing a module that will change the tab orders.  I can update the tab with the new parent ID, but I can't get the tab orders to work.

For example, I have the following TabIDs in order: 55,56,57,58  and I set tab 58's parent =  55 using the UpdateTab method on the tab controller.  The menu shows eveerything in the right place.  But, when you look at the admin->pages module, I might get something like 55,56,58,57 instead of 55,58,56,57

I tried looking at what the admin/managetabs control does, but it just seems to run the UpdateTab method and viola it works.

Any thoughts?  Right now I am updating the orders of the tabs directly in the DB and that works, but somehow I think I am missing something.

Edit:

Here is some sample code:

Dim objTabs As New TabController
Dim objTab As DotNetNuke.Entities.Tabs.TabInfo
objTab = objTabs.GetTab(585, PortalId, False)
objTab.ParentId = 650
objTabs.UpdateTab(objTab)

After this runs, Tab 585 has the correct parent and shows up in the right place on the menu.  However, its level and order are not changed and so in the Admin->pages listings it shows up in the wrong place.


Eric Shafer
Houston Web Designer
Click and Create

281-206-2631
 
New Post
11/8/2023 2:47 AM
 
It's years later and I ran across a similar issue and found a solution. In Eric's case above, the solution is to make a separate call to either of the following:
void MoveTabAfter(TabInfo tab, int afterTabId);
void MoveTabBefore(TabInfo tab, int beforeTabId);

In my case, because I'm creating a new tab, rather than modifying an existing one, I will user either of the following:
int AddTabAfter(TabInfo tab, int afterTabId);
int AddTabBefore(TabInfo objTab, int beforeTabId);

If you find this helpful, find a way to celebrate! You deserve it. Otherwise, keep looking. Your answer is out there.
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Setting Tab OrderSetting Tab Order


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