Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...DNN Friendly url performance increasement?DNN Friendly url performance increasement?
Previous
 
Next
New Post
1/24/2009 8:28 AM
 

Hi,

I am trying to get the Apollo localization working with ifinity sitemap and urlrewrite. I am first digging into the sitemap. Erik has been very helpful by supplying me a dedicated PL3 which can pass the language and portalid so that the localized tabs are collected. What I have understood is that in PL5 this will become standard. So besides getLocalizedTab() you now have getLocalizedTab(language)  and getLocalizedTab(language, portalId).

So far so good. So I get a localized TabInfo from Apollo. But then the http urlrewriter of DNN does what is given in next piece of code (DNN 4.8.4).

At (A) if you have only one local installed and not enable language in url you get the thread's culture name instead of the language you have defined.

At (B) you get the DNN tabs instead of the localized tab sent true the parameter. I actually do no understand why this loop is required? I believe removing it will speed up performance significantly. If you pass a TabInfo, why check it again if it is existing?

Any help appreciated.

J.

''' <summary>
''' Returns a full internal url
''' </summary>
''' <param name="TabID">The tab id linking to</param>
''' <param name="IsSuperTab">Is the destination tab a host tab?</param>
''' <param name="settings">the Portalsettings</param>
''' <param name="ControlKey">an optional controlkey. If no controlkey is needed, pass "" </param>
''' <param name="Language">an optional language. If language is an empty string, the current active culture will be added in the url.</param>
''' <param name="AdditionalParameters">Any aditional querystring parameters. Use this format: "param1=value1", "param2=value2", ... , "paramN=valueN"</param>
''' <returns>Returns a full internal url</returns>
''' <remarks></remarks>
Public Function NavigateURL(ByVal TabID As Integer, ByVal IsSuperTab As Boolean, ByVal settings As PortalSettings, ByVal ControlKey As String, ByVal Language As String, ByVal ParamArray AdditionalParameters As String()) As String

Dim strURL As String

If TabID = Null.NullInteger Then
strURL = ApplicationURL()
Else
strURL = ApplicationURL(TabID)
End If

If ControlKey <> "" Then
strURL += "&ctl=" & ControlKey
End If

If Not (AdditionalParameters Is Nothing) Then
For Each parameter As String In AdditionalParameters
If Not String.IsNullOrEmpty(parameter) Then
strURL += "&" & parameter
End If
Next
End If

If IsSuperTab Then
strURL += "&portalid=" & settings.PortalId.ToString
End If

'only add language to url if more than one locale is enabled, and if admin did not turn it off
If Localization.GetEnabledLocales.Count > 1 AndAlso Localization.UseLanguageInUrl Then
If Language = "" Then
strURL += "&language=" & Thread.CurrentThread.CurrentCulture.Name (A)
Else
strURL += "&language=" & Language
End If
End If

If DotNetNuke.Entities.Host.HostSettings.GetHostSetting("UseFriendlyUrls") = "Y" Then

For Each objTab As TabInfo In settings.DesktopTabs (B)
If objTab.TabID = TabID Then
Return FriendlyUrl(objTab, strURL, settings)
End If

Next

Return FriendlyUrl(Nothing, strURL, settings)

Else
Return ResolveUrl(strURL)
End If

End Function

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...DNN Friendly url performance increasement?DNN Friendly url performance increasement?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out