• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class RedirectionController

Inheritance
System.Object
RedirectionController
Implements
IRedirectionController
Namespace: DotNetNuke.Services.Mobile
Assembly: DotNetNuke.dll
Syntax
public class RedirectionController : object, IRedirectionController

Methods

| Improve this Doc View Source

Delete(Int32, Int32)

delete a redirection.

Declaration
public void Delete(int portalId, int id)
Parameters
Type Name Description
System.Int32 portalId

Portal's id.

System.Int32 id

the redirection's id.

| Improve this Doc View Source

DeleteRule(Int32, Int32, Int32)

delete a redirection's match rule.

Declaration
public void DeleteRule(int portalId, int redirectionId, int ruleId)
Parameters
Type Name Description
System.Int32 portalId

Portal's id.

System.Int32 redirectionId

the redirection's id.

System.Int32 ruleId

the rule's id.

| Improve this Doc View Source

GetAllRedirections()

get all redirections defined in system.

Declaration
public IList<IRedirection> GetAllRedirections()
Returns
Type Description
IList<IRedirection>

List of redirection.

| Improve this Doc View Source

GetFullSiteUrl()

Get Url for the equivalent full site based on the current page of the mobile site.

Declaration
public string GetFullSiteUrl()
Returns
Type Description
System.String

string - Empty if redirection rules are not defined or no match found.

| Improve this Doc View Source

GetFullSiteUrl(Int32, Int32)

Get Url for the equivalent full site based on the current page of the mobile site.

Declaration
public string GetFullSiteUrl(int portalId, int currentTabId)
Parameters
Type Name Description
System.Int32 portalId

Portal Id from which Redirection Rules should be applied.

System.Int32 currentTabId

Current Tab Id that needs to be evaluated.

Returns
Type Description
System.String

string - Empty if redirection rules are not defined or no match found.

| Improve this Doc View Source

GetMobileSiteUrl()

Get Url for the equivalent mobile site based on the current page of the full site.

Declaration
public string GetMobileSiteUrl()
Returns
Type Description
System.String

string - Empty if redirection rules are not defined or no match found.

| Improve this Doc View Source

GetMobileSiteUrl(Int32, Int32)

Get Url for the equivalent mobile site based on the current page of the full site.

Declaration
public string GetMobileSiteUrl(int portalId, int currentTabId)
Parameters
Type Name Description
System.Int32 portalId

Portal Id from which Redirection Rules should be applied.

System.Int32 currentTabId

Current Tab Id that needs to be evaluated.

Returns
Type Description
System.String

string - Empty if redirection rules are not defined or no match found.

| Improve this Doc View Source

GetRedirectionById(Int32, Int32)

get a specific redirection by id.

Declaration
public IRedirection GetRedirectionById(int portalId, int id)
Parameters
Type Name Description
System.Int32 portalId

the ID of the portal to which the redirection belongs.

System.Int32 id

The redirection ID.

Returns
Type Description
IRedirection

redirection object.

| Improve this Doc View Source

GetRedirectionsByPortal(Int32)

get a redirection list for portal.

Declaration
public IList<IRedirection> GetRedirectionsByPortal(int portalId)
Parameters
Type Name Description
System.Int32 portalId

redirection id.

Returns
Type Description
IList<IRedirection>

List of redirection.

| Improve this Doc View Source

GetRedirectUrl(String, Int32, Int32)

Get Redirection Url based on Http Context and Portal Id.

Declaration
public string GetRedirectUrl(string userAgent, int portalId, int currentTabId)
Parameters
Type Name Description
System.String userAgent

User Agent - used for client capability detection.

System.Int32 portalId

Portal Id from which Redirection Rules should be applied.

System.Int32 currentTabId

Current Tab Id that needs to be evaluated.

Returns
Type Description
System.String

string - Empty if redirection rules are not defined or no match found.

| Improve this Doc View Source

GetRedirectUrl(String)

Get Redirection Url based on UserAgent.

Declaration
public string GetRedirectUrl(string userAgent)
Parameters
Type Name Description
System.String userAgent

User Agent - used for client capability detection.

Returns
Type Description
System.String

string - Empty if redirection rules are not defined or no match found.

| Improve this Doc View Source

GetRedirectUrlFromRule(IRedirection, Int32, Int32)

returns a target URL for the specific redirection.

Declaration
public string GetRedirectUrlFromRule(IRedirection redirection, int portalId, int currentTabId)
Parameters
Type Name Description
IRedirection redirection
System.Int32 portalId
System.Int32 currentTabId
Returns
Type Description
System.String

The URL (or if there's no redirect).

| Improve this Doc View Source

IsRedirectAllowedForTheSession(HttpApplication)

Is Redirection Allowed for the session. Method analyzes the query string for special parameters to enable / disable redirects. Cookie is created to temporarily store those parameters so that they remain available till the interactions are active.

Declaration
public bool IsRedirectAllowedForTheSession(HttpApplication app)
Parameters
Type Name Description
HttpApplication app

app - HttpApplication. Request and Response properties are used.

Returns
Type Description
System.Boolean

boolean - True if redirection.

| Improve this Doc View Source

PurgeInvalidRedirections(Int32)

Deletes all redirection rules that were set for pages that have been soft or hard deleted.

Declaration
public void PurgeInvalidRedirections(int portalId)
Parameters
Type Name Description
System.Int32 portalId
| Improve this Doc View Source

Save(IRedirection)

save a redirection. If redirection.Id equals Null.NullInteger(-1), that means need to add a new redirection; otherwise will update the redirection by redirection.Id.

Declaration
public void Save(IRedirection redirection)
Parameters
Type Name Description
IRedirection redirection

redirection object.

Implements

IRedirectionController

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS