Class GlobalsImpl
A collection of Dnn global methods and properties.
Inheritance
Implements
Namespace: DotNetNuke.Common.Internal
Assembly: DotNetNuke.dll
Syntax
public class GlobalsImpl : object, IGlobals
Constructors
| Improve this Doc View SourceGlobalsImpl()
Initializes a new instance of the GlobalsImpl class.
Declaration
public GlobalsImpl()
Properties
| Improve this Doc View SourceApplicationPath
Gets the application path.
Declaration
public string ApplicationPath { get; }
Property Value
Type | Description |
---|---|
System.String |
HostMapPath
Gets the host map path.
Declaration
public string HostMapPath { get; }
Property Value
Type | Description |
---|---|
System.String | ApplicationMapPath + "Portals_default". |
NavigationManager
Gets a navigation manager to provide navigation services.
Declaration
protected INavigationManager NavigationManager { get; }
Property Value
Type | Description |
---|---|
INavigationManager |
Methods
| Improve this Doc View SourceAccessDeniedURL()
Get the URL to show the "access denied" message.
Declaration
public string AccessDeniedURL()
Returns
Type | Description |
---|---|
System.String | URL to access denied view. |
AccessDeniedURL(String)
Get the URL to show the "access denied" message.
Declaration
public string AccessDeniedURL(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message to display. |
Returns
Type | Description |
---|---|
System.String | URL to access denied view. |
AddHTTP(String)
Adds the current request's protocol ("http://"
or "https://"
) to the given URL, if it does not already have a protocol specified.
Declaration
public string AddHTTP(string strURL)
Parameters
Type | Name | Description |
---|---|---|
System.String | strURL | The URL. |
Returns
Type | Description |
---|---|
System.String | The formatted URL. |
FormatHelpUrl(String, PortalSettings, String, String)
Formats the help URL, adding query-string parameters and a protocol (if missing).
Declaration
public string FormatHelpUrl(string helpUrl, PortalSettings objPortalSettings, string name, string version)
Parameters
Type | Name | Description |
---|---|---|
System.String | helpUrl | The help URL. |
PortalSettings | objPortalSettings | The portal settings. |
System.String | name | The name of the module. |
System.String | version | The version of the module. |
Returns
Type | Description |
---|---|
System.String | Formatted URL. |
FormatHelpUrl(String, PortalSettings, String)
Formats the help URL, adding query-string parameters and a protocol (if missing).
Declaration
public string FormatHelpUrl(string helpUrl, PortalSettings objPortalSettings, string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | helpUrl | The help URL. |
PortalSettings | objPortalSettings | The portal settings. |
System.String | name | The name of the module. |
Returns
Type | Description |
---|---|
System.String | Formatted URL. |
FriendlyUrl(TabInfo, String, PortalSettings)
Generates the correctly formatted friendly URL.
Declaration
public string FriendlyUrl(TabInfo tab, string path, PortalSettings settings)
Parameters
Type | Name | Description |
---|---|---|
TabInfo | tab | The current tab. |
System.String | path | The path to format. |
PortalSettings | settings | The portal settings. |
Returns
Type | Description |
---|---|
System.String | The formatted (friendly) URL. |
Remarks
This overload includes the portal settings for the site.
FriendlyUrl(TabInfo, String, String, PortalSettings)
Generates the correctly formatted friendly URL.
Declaration
public string FriendlyUrl(TabInfo tab, string path, string pageName, PortalSettings settings)
Parameters
Type | Name | Description |
---|---|---|
TabInfo | tab | The current tab. |
System.String | path | The path to format. |
System.String | pageName | The page to include in the URL. |
PortalSettings | settings | The portal settings. |
Returns
Type | Description |
---|---|
System.String | The formatted (friendly) url. |
Remarks
This overload includes an optional page to include in the URL, and the portal settings for the site.
FriendlyUrl(TabInfo, String, String, String)
Generates the correctly formatted friendly url.
Declaration
public string FriendlyUrl(TabInfo tab, string path, string pageName, string portalAlias)
Parameters
Type | Name | Description |
---|---|---|
TabInfo | tab | The current tab. |
System.String | path | The path to format. |
System.String | pageName | The page to include in the URL. |
System.String | portalAlias | The portal alias for the site. |
Returns
Type | Description |
---|---|
System.String | The formatted (friendly) URL. |
Remarks
This overload includes an optional page to include in the url, and the portal alias for the site.
FriendlyUrl(TabInfo, String, String)
Generates the correctly formatted friendly URL.
Declaration
public string FriendlyUrl(TabInfo tab, string path, string pageName)
Parameters
Type | Name | Description |
---|---|---|
TabInfo | tab | The current tab. |
System.String | path | The path to format. |
System.String | pageName | The page to include in the url. |
Returns
Type | Description |
---|---|
System.String | The formatted (friendly) URL. |
Remarks
This overload includes an optional page to include in the url.
FriendlyUrl(TabInfo, String)
Generates the correctly formatted friendly URL.
Declaration
public string FriendlyUrl(TabInfo tab, string path)
Parameters
Type | Name | Description |
---|---|---|
TabInfo | tab | The current tab. |
System.String | path | The path to format. |
Returns
Type | Description |
---|---|
System.String | The formatted (friendly) URL. |
Remarks
Assumes Default.aspx, and that portalsettings are saved to Context.
GetDomainName(Uri, Boolean)
returns the domain name of the current request ( ie. www.domain.com or 207.132.12.123 or www.domain.com/directory if subhost ).
Declaration
public string GetDomainName(Uri requestedUri, bool parsePortNumber)
Parameters
Type | Name | Description |
---|---|---|
Uri | requestedUri | The requested Uri. |
System.Boolean | parsePortNumber | if set to |
Returns
Type | Description |
---|---|
System.String | domain name. |
GetDomainName(Uri)
Gets the name of the domain.
Declaration
public string GetDomainName(Uri requestedUri)
Parameters
Type | Name | Description |
---|---|---|
Uri | requestedUri | The requested Uri. |
Returns
Type | Description |
---|---|
System.String | domain name. |
GetPortalDomainName(String, HttpRequest, Boolean)
Gets the portal domain name.
Declaration
public string GetPortalDomainName(string strPortalAlias, HttpRequest request, bool blnAddHTTP)
Parameters
Type | Name | Description |
---|---|---|
System.String | strPortalAlias | The portal alias. |
HttpRequest | request | The request or |
System.Boolean | blnAddHTTP | if set to |
Returns
Type | Description |
---|---|
System.String | domain name. |
GetSubFolderPath(String, Int32)
Returns the folder path under the root for the portal.
Declaration
public string GetSubFolderPath(string strFileNamePath, int portalId)
Parameters
Type | Name | Description |
---|---|---|
System.String | strFileNamePath | |
System.Int32 | portalId | Portal Id. |
Returns
Type | Description |
---|---|
System.String | The subfolder path. |
IsHostTab(Int32)
Check whether the specific page is a host page.
Declaration
public bool IsHostTab(int tabId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tabId | The tab ID. |
Returns
Type | Description |
---|---|
System.Boolean | if |
LinkClick(String, Int32, Int32, Boolean, Boolean, Int32, Boolean, String)
Gets Link click url.
Declaration
public string LinkClick(string link, int tabID, int moduleID, bool trackClicks, bool forceDownload, int portalId, bool enableUrlLanguage, string portalGuid)
Parameters
Type | Name | Description |
---|---|---|
System.String | link | The link. |
System.Int32 | tabID | |
System.Int32 | moduleID | |
System.Boolean | trackClicks | Check whether it has to track clicks. |
System.Boolean | forceDownload | Check whether it has to force the download. |
System.Int32 | portalId | The Portal ID. |
System.Boolean | enableUrlLanguage | Check whether the portal has enabled ulr languages. |
System.String | portalGuid | The Portal GUID. |
Returns
Type | Description |
---|---|
System.String | The url for the link click. |
LinkClick(String, Int32, Int32)
Gets Link click url.
Declaration
public string LinkClick(string link, int tabId, int moduleId)
Parameters
Type | Name | Description |
---|---|---|
System.String | link | The link. |
System.Int32 | tabId | The tab ID. |
System.Int32 | moduleId | The module ID. |
Returns
Type | Description |
---|---|
System.String | Formatted url. |
LoginURL(String, Boolean)
Gets the login URL.
Declaration
public string LoginURL(string returnURL, bool override)
Parameters
Type | Name | Description |
---|---|---|
System.String | returnURL | The URL to redirect to after logging in. |
System.Boolean | override | if set to |
Returns
Type | Description |
---|---|
System.String | Formatted URL. |
NavigateURL()
Gets the URL to the current page.
Declaration
public string NavigateURL()
Returns
Type | Description |
---|---|
System.String | Formatted URL. |
NavigateURL(Int32, PortalSettings, String, String[])
Gets the URL to show the given page.
Declaration
public string NavigateURL(int tabID, PortalSettings settings, string controlKey, params string[] additionalParameters)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tabID | The tab ID. |
PortalSettings | settings | The portal settings. |
System.String | controlKey | The control key, or |
System.String[] | additionalParameters | Any additional parameters. |
Returns
Type | Description |
---|---|
System.String | Formatted URL. |
NavigateURL(Int32, Boolean, PortalSettings, String, String, String, String[])
Gets the URL to show the given page.
Declaration
public string NavigateURL(int tabID, bool isSuperTab, PortalSettings settings, string controlKey, string language, string pageName, params string[] additionalParameters)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tabID | The tab ID. |
System.Boolean | isSuperTab | if set to |
PortalSettings | settings | The portal settings. |
System.String | controlKey | The control key, or |
System.String | language | The language code. |
System.String | pageName | The page name to pass to FriendlyUrl(TabInfo, String, String). |
System.String[] | additionalParameters | Any additional parameters. |
Returns
Type | Description |
---|---|
System.String | Formatted url. |
NavigateURL(Int32, Boolean, PortalSettings, String, String, String[])
Gets the URL to show the given page.
Declaration
public string NavigateURL(int tabID, bool isSuperTab, PortalSettings settings, string controlKey, string language, params string[] additionalParameters)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tabID | The tab ID. |
System.Boolean | isSuperTab | if set to |
PortalSettings | settings | The portal settings. |
System.String | controlKey | The control key, or |
System.String | language | The language code. |
System.String[] | additionalParameters | Any additional parameters. |
Returns
Type | Description |
---|---|
System.String | Formatted URL. |
NavigateURL(Int32, Boolean, PortalSettings, String, String[])
Gets the URL to show the given page.
Declaration
public string NavigateURL(int tabID, bool isSuperTab, PortalSettings settings, string controlKey, params string[] additionalParameters)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tabID | The tab ID. |
System.Boolean | isSuperTab | if set to |
PortalSettings | settings | The portal settings. |
System.String | controlKey | The control key, or |
System.String[] | additionalParameters | Any additional parameters. |
Returns
Type | Description |
---|---|
System.String | Formatted URL. |
NavigateURL(Int32, Boolean)
Gets the URL to the given page.
Declaration
public string NavigateURL(int tabID, bool isSuperTab)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tabID | The tab ID. |
System.Boolean | isSuperTab | if set to |
Returns
Type | Description |
---|---|
System.String | Formatted URL. |
NavigateURL(Int32, String, String[])
Gets the URL to show the given page.
Declaration
public string NavigateURL(int tabID, string controlKey, params string[] additionalParameters)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tabID | The tab ID. |
System.String | controlKey | The control key, or |
System.String[] | additionalParameters | Any additional parameters. |
Returns
Type | Description |
---|---|
System.String | Formatted URL. |
NavigateURL(Int32, String)
Gets the URL to show the control associated with the given control key on the given page.
Declaration
public string NavigateURL(int tabID, string controlKey)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tabID | The tab ID. |
System.String | controlKey | The control key, or |
Returns
Type | Description |
---|---|
System.String | Formatted URL. |
NavigateURL(Int32)
Gets the URL to the given page.
Declaration
public string NavigateURL(int tabID)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tabID | The tab ID. |
Returns
Type | Description |
---|---|
System.String | Formatted URL. |
NavigateURL(String, String[])
Gets the URL to show the control associated with the given control key.
Declaration
public string NavigateURL(string controlKey, params string[] additionalParameters)
Parameters
Type | Name | Description |
---|---|---|
System.String | controlKey | The control key, or |
System.String[] | additionalParameters | Any additional parameters, in |
Returns
Type | Description |
---|---|
System.String | Formatted URL. |
NavigateURL(String)
Gets the URL to show the control associated with the given control key.
Declaration
public string NavigateURL(string controlKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | controlKey | The control key, or |
Returns
Type | Description |
---|---|
System.String | Formatted URL. |
ResolveUrl(String)
Generates the correctly formatted url.
Declaration
public string ResolveUrl(string url)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The url to format. |
Returns
Type | Description |
---|---|
System.String | The formatted (resolved) url. |