If you want simple answers to theses questions, copy (and adapt) this code in a user control and look at the output.
- <%= DotNetNuke.Common.Globals.DesktopModulePath %> - DesktopModulePath<br/>
- <%= DotNetNuke.Common.Globals.LoginURL("", true) %> - LoginURL<br/>
- <%= DotNetNuke.Common.Globals.NavigateURL(TabId) %> - NavigateURL<br/>
- <%= DotNetNuke.Common.Globals.ResolveUrl("~/DesktopModules/NavigioMap/")%> - ResolveUrl<br/>
- <%= DotNetNuke.Common.Globals.ApplicationPath%> - ApplicationPath<br/>
- <%= Context.Request.Url.GetLeftPart(UriPartial.Path)%> - Context.Request.Url<br/>
- <%= ApplicationAbsolutePath %> - ApplicationAbsolutePath<br/>
- <%= DesktopModuleAbsolutePath %> - DesktopModuleAbsolutePath<br/>
- <%= DotNetNuke.Common.Globals.NavigateURL("PoiPrint", "usid", "17") %> - NavigateURL("PoiPrint", "usid", "17") <br/>
- <%= EditUrl("usid", "17", "PoiPrint")%> - EditUrl("usid", "17", "PoiPrint")<br/>
- <%= EditUrl("Settings")%> - EditUrl("Settings")<br/>
And here is the output of this code in my case when working under local IIS with a virtual folder called "navigio.website":
- /navigio.website/DesktopModules/ - DesktopModulePath
- http://localhost/navigio.website/language/en-US/Map/ctl/Login.aspx - LoginURL
- http://localhost/navigio.website/language/en-US/Map.aspx - NavigateURL
- /navigio.website/DesktopModules/NavigioMap/ - ResolveUrl
- /navigio.website - ApplicationPath
- http://localhost/Navigio.Website/Default.aspx - Context.Request.Url
- http://localhost - ApplicationAbsolutePath
- http://localhost/navigio.website/DesktopModules/ - DesktopModuleAbsolutePath
- http://localhost/navigio.website/language/en-US/Map/ctl/PoiPrint/usid/17.aspx - NavigateURL("PoiPrint", "usid", "17")
- javascript:dnnModal.show('http://localhost/navigio.website/language/en-US/Map/ctl/PoiPrint/mid/412/usid/17.aspx?popUp=true',/*showReturn*/false,550,950,true,'') - EditUrl("usid", "17", "PoiPrint")
- http://localhost/navigio.website/language/en-US/Map/ctl/Settings/mid/412.aspx - EditUrl("Settings")
Important notes:
- I use friendly Url's provided by ifinity, and the sample navigio.website DotNetNuke portal is multilanguage enabled. This explains such output Url's http://localhost/navigio.website/language/en-US/Map.aspx.
- The line 10 shows javascript:dnnModal.show(...), this is due to the Module definitions. The "PoiPrint" Module Control is defined in a Module Definition different that the control that runs the "EditUrl(...)" code
- The line 11 shows a standard Url as the "Settings" Module Control is defined in the same Module Definition that runs the "EditUrl(...)" code
- Module Definitions and other Dotnetnuke deployement stuffs are described in the DotNetNuke Wiki
Oh yes, maybe you wonder what are "ApplicationAbsolutePath" and "DesktopModuleAbsolutePath"?
They're helper properties from the base page. Here is the code:
- /// <summary>
- /// Gets the absolute path of the application (ie. http://localhost)
- /// </summary>
- public string ApplicationAbsolutePath
- {
- get
- {
- return
- Context.Request.Url.GetLeftPart(UriPartial.Path)
- .Substring(0,
- Context.Request.Url.GetLeftPart(
- UriPartial.Path).IndexOf(
- DotNetNuke.Common.Globals.
- ApplicationPath,
- System.StringComparison.
- CurrentCultureIgnoreCase));
- }
- }
- /// <summary>
- /// Gets the absolute path of the DesktopModule (ie.http://localhost/navigio.website/DesktopModules/)
- /// </summary>
- public string DesktopModuleAbsolutePath
- {
- get { return String.Concat(ApplicationAbsolutePath, DotNetNuke.Common.Globals.DesktopModulePath); }
- }
Thank you to http://quickhighlighter.com/ for code formatting ;-)