Interface IGlobals
A collection of Dnn global methods and properties.
Namespace: DotNetNuke.Common.Internal
Assembly: DotNetNuke.dll
Syntax
public interface IGlobals
Properties
| Improve this Doc View SourceApplicationPath
Gets the application path.
Declaration
string ApplicationPath { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
HostMapPath
Gets the host map path.
Declaration
string HostMapPath { get; }
Property Value
| Type | Description |
|---|---|
| System.String | ApplicationMapPath + "Portals_default". |
Methods
| Improve this Doc View SourceAccessDeniedURL()
Get the URL to show the "access denied" message.
Declaration
string AccessDeniedURL()
Returns
| Type | Description |
|---|---|
| System.String | URL to access denied view. |
AccessDeniedURL(String)
Get the URL to show the "access denied" message.
Declaration
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
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
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
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
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
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
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
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
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
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
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
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
string GetSubFolderPath(string fileNamePath, int portalId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | fileNamePath | The folder the absolute path. |
| 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
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
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 | The Tab ID. |
| System.Int32 | moduleId | The Module ID. |
| 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
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
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
string NavigateURL()
Returns
| Type | Description |
|---|---|
| System.String | Formatted URL. |
NavigateURL(Int32, PortalSettings, String, String[])
Gets the URL to show the given page.
Declaration
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
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
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
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
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
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
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
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
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
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
string ResolveUrl(string url)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | url | The url to format. |
Returns
| Type | Description |
|---|---|
| System.String | The formatted (resolved) url. |