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...Building ExtensionsBuilding ExtensionsModulesModulesNavigateURL still doesn't workNavigateURL still doesn't work
Previous
 
Next
New Post
6/14/2013 6:39 PM
 

DNN ver 5.6.8

If I pass in the TabID of a page to the NavigateURL method, it returns something, but I don't understand what...

The page I'm trying to link to is: 
TabId: 3218
URL: http://MySite.com/MyPortal/ParentPage/ChildPage/tabid/3218/Default.aspx

But this code
DotNetNuke.Common.Globals.NavigateURL(3218);
Returns this url: 
http://MySite.com/MyPortal/ParentPage/tabid/7639/ctl/3218/Default.aspx

TabId 7639 is the page where I have this link... any idea why NavigateURL is returning this url?

 
New Post
6/16/2013 4:53 AM
 
ctl is used to identify the module on the page, you need to pass proper parameter, please see documentation.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
6/17/2013 12:41 PM
 

Sebastian,

Thanks for the reply, more detail:
I'm using the UrlControl in my settings so users can set the URL property for a link. The UrlControl (AFAIK) returns the TabId of the selected page... can I use that TabId to get the URL of the selected page?

string myUrl = DotNetNuke.Common.Globals.NavigateURL(selectedTabId, string.Empty);

I've been unable to find any official looking "documentation." When I search for that, all I get are articles complaining about or discussing the lack of documentation for Dotnetnuke. Do you have a link?

If not, is there a way to get a URL for a page from the TabID?

 
New Post
6/17/2013 1:31 PM
 

Obviously, I'm doing something wrong and I'm guessing it's with the UrlControl...the wiki for the UrlControl suggests the acceptable values for UrlType are F, U and P... when debugging my UrlControl has a UrlType of "T" which I'm guessing is Tab? I've verified that in my markup I have the UrlType set to "P."

UrlType Acceptable values, F, U, P, for File (link to a file), U (link to a URL) or P (link to an existing DNN page)

Again, ANY link to ANYTHING helpful is much appreciated.

 
New Post
6/17/2013 1:53 PM
 

Hello,

This is just a hunch, but is your number actually coming in as a string. I think if NavigateURL gets an integer as the first and only parameter, it takes it as the TabID. With the URL control, you usually have to pre-process the result to determine the type of thing it is and then handle it accordingly. For example, you'd treat file links differently than tab links. 

In any case, once you have the tabID, try just wrapping it in CInt() or (int).

Mike

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesNavigateURL still doesn't workNavigateURL still doesn't work


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