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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Adding tab does not format the FullUrl with "HumanFriendly" Url.Adding tab does not format the FullUrl with "HumanFriendly" Url.
Previous
 
Next
New Post
3/4/2009 3:42 PM
 

DNN 4.9.2

I have a custom module that creates tabs in my portal.  Once the tab is created it uses the FullUrl property and logs it in the database for my module to use later.  I have "HumanFriendly" urls turned on.  Everything works fine, except the FullUrl property is not formated in a "HumanFriendly" format.

Code:

                            controller.AddTab(newTab);
                            DataCache.ClearModuleCache(newTab.TabID);
                            DataCache.ClearTabsCache(PortalId);
                            newTab = controller.GetTabByName(newTab.TabName, PortalId, newTab.ParentId);

The FullUrl property of newTab is:  http://Domain.com/tabid/83/Default.aspx

If I navigate to the page and then load the tab again in code the full url will be in the correct format: http://domain.com/GolfCourses/FarOaksGolfClub.aspx

I feel like I'm missing something here.  Can anyone clue me in to what it is?


                           

 
New Post
3/4/2009 6:24 PM
 

I'm not too sure about the implementation of the FullUrl property, but you should get the proper url by calling

Globals.NavigateUrl(newTab.TabID)

 
New Post
3/4/2009 6:56 PM
 

Globals.NavgiateURL(Tab.TabID) does not give the human friendly format of the url. 

 
New Post
3/5/2009 9:24 AM
 

If Globals.NavigateUrl does not return the proper friendly URL, there is either a strange behavior in the DNN framework or there is something DNN does not like on your side when creating the new tab, such as fields of the TabInfo class not set.

If I was stuck with such issue, I would recompile DNN from source in Debug mode, then copy DotNetNuke.dll and DotNetNuke.pdb on my local installation, Debug the module,hit F11 for the NavigateURL call and trace into DNN to investigate, find the cause, then hack a solution.

 
New Post
3/5/2009 3:42 PM
 

Here is my code for creating a new tab:

newTab.PortalID = PortalId;
newTab.TabName = this.txteName.Text;
newTab.Title = this.txtName.Text;
newTab.Description = "Details for " + this.txtName.Text;
newTab.KeyWords = this.txtName.Text;
newTab.IsDeleted = false;
newTab.IsSuperTab = false;
newTab.IsVisible = false;
newTab.DisableLink = false;
newTab.IconFile = "";
newTab.ParentId = currentTab.ParentId;
newTab.TabPermissions = parentTab.TabPermissions;
controller.AddTab(newTab);

I then have to "get" the tab to populate the fields after creation.

newTab = controller.GetTabByName(newTab.TabName, PortalId, newTab.ParentId);

Now Globals.NavigateUrl(newTab.TabID) gives me the friendly url.  But not the "HumanFriendly" url.

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Adding tab does not format the FullUrl with "HumanFriendly" Url.Adding tab does not format the FullUrl with "HumanFriendly" Url.


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