Transforms a friendly Url into a querystring. Used as input into the rewriting process, after the Url Rewriting process has identified the correct DNN Page.
Namespace: DotNetNuke.Entities.UrlsAssembly: DotNetNuke (in DotNetNuke.dll)
Syntax
C# |
---|
public abstract string TransformFriendlyUrlToQueryString( string[] urlParms, int tabId, int portalId, FriendlyUrlOptions options, string cultureCode, PortalAliasInfo portalAlias, ref List<string> messages, out int status, out string location ) |
Visual Basic |
---|
Public MustOverride Function TransformFriendlyUrlToQueryString ( urlParms As String(), tabId As Integer, portalId As Integer, options As FriendlyUrlOptions, cultureCode As String, portalAlias As PortalAliasInfo, ByRef messages As List(Of String), <OutAttribute> ByRef status As Integer, <OutAttribute> ByRef location As String ) As String |
Parameters
- urlParms
- Type: array<System..::..String>[]()[][]
string array of the friendly Url Path elements, separated by /
- tabId
- Type: System..::..Int32
TabId of page the Friendly Url
- portalId
- Type: System..::..Int32
PortalId of the Friendly Url
- options
- Type: DotNetNuke.Entities.Urls..::..FriendlyUrlOptions
paramoptionsM:DotNetNuke.Entities.Urls.ExtensionUrlProvider.TransformFriendlyUrlToQueryString(System.String[],System.Int32,System.Int32,DotNetNuke.Entities.Urls.FriendlyUrlOptions,System.String,DotNetNuke.Entities.Portals.PortalAliasInfo,System.Collections.Generic.List{System.String}@,System.Int32@,System.String@)
- cultureCode
- Type: System..::..String
paramcultureCodeM:DotNetNuke.Entities.Urls.ExtensionUrlProvider.TransformFriendlyUrlToQueryString(System.String[],System.Int32,System.Int32,DotNetNuke.Entities.Urls.FriendlyUrlOptions,System.String,DotNetNuke.Entities.Portals.PortalAliasInfo,System.Collections.Generic.List{System.String}@,System.Int32@,System.String@)
- portalAlias
- Type: DotNetNuke.Entities.Portals..::..PortalAliasInfo
paramportalAliasM:DotNetNuke.Entities.Urls.ExtensionUrlProvider.TransformFriendlyUrlToQueryString(System.String[],System.Int32,System.Int32,DotNetNuke.Entities.Urls.FriendlyUrlOptions,System.String,DotNetNuke.Entities.Portals.PortalAliasInfo,System.Collections.Generic.List{System.String}@,System.Int32@,System.String@)
- messages
- Type: System.Collections.Generic..::..List<(Of <(<'String>)>)>%
parammessagesM:DotNetNuke.Entities.Urls.ExtensionUrlProvider.TransformFriendlyUrlToQueryString(System.String[],System.Int32,System.Int32,DotNetNuke.Entities.Urls.FriendlyUrlOptions,System.String,DotNetNuke.Entities.Portals.PortalAliasInfo,System.Collections.Generic.List{System.String}@,System.Int32@,System.String@)
- status
- Type: System..::..Int32%
paramstatusM:DotNetNuke.Entities.Urls.ExtensionUrlProvider.TransformFriendlyUrlToQueryString(System.String[],System.Int32,System.Int32,DotNetNuke.Entities.Urls.FriendlyUrlOptions,System.String,DotNetNuke.Entities.Portals.PortalAliasInfo,System.Collections.Generic.List{System.String}@,System.Int32@,System.String@)
- location
- Type: System..::..String%
paramlocationM:DotNetNuke.Entities.Urls.ExtensionUrlProvider.TransformFriendlyUrlToQueryString(System.String[],System.Int32,System.Int32,DotNetNuke.Entities.Urls.FriendlyUrlOptions,System.String,DotNetNuke.Entities.Portals.PortalAliasInfo,System.Collections.Generic.List{System.String}@,System.Int32@,System.String@)
Return Value
Querystring value in key=value format, which will be used as an input to the rewriting function.
Remarks
This method will be only called if there is no match between the Page Index entries this Provider supplies via the 'CreatePageIndex' method. This method is called
when a DNN page match is found in the requested path, and there are other parameters behind the page path. You should only return a TabId in the querystring, when the ChangeFriendlyUrl function is returning 'true' for the output value of 'useDnnPagePath'.
Examples
Given a Url of example.com/pagename/key/value - this method will be called with key,value in the urlParms array with a page match on 'pagename'. The method should return 'key=value'.
Or, if given a Url of example.com/pagename/my-friendly-module-url, it should transform 'my-friendly-module-url' into whatever the module actually uses to build content. This might mean returning 'article=2354' derived from doing a specific lookup on 'my-friendly-module-url'.
Warning: It's unwise to do a specific database lookup for each call of this method. This method needs to be high-performance so should use a stateless method (ie, regex parse) or, if looking up database values, cached hashtables or thread-safe dictionaries.