0

In my sitefinity application, I need to remove default language prefix from sitefinity page URLs. Like in my case ar from https://www.example.net/ar/individual/products

So I did the following configuration change as mentioned in sitefinity documents:

1- Clicked Administration » Settings » Advanced.

2-In the treeview on the left, clicked Resources » UrlLocalizationStrategies » SubFolderUrlLocalizationStrategy » Parameters

3-In Key includeSubfoderPrefixForDefaultLanguage, entered False

4-Saved my changes and restarted the application.

But it did not work. Now, pages are still showing default culture prefix in Page URLs

Sami Hussain
  • 179
  • 3
  • 9
  • What exactly do you mean by "pages are still showing default culture prefix in Page URLs" ? Do you mean the navigation widget still generates page urls with the default culture prefix? If so, do you use the built-in nav widget? mvc or webforms? – Veselin Vasilev Apr 02 '19 at 11:27
  • No I mean when I navigate pages from back end of sitefinity. It shows language prefix in page URLs – Sami Hussain Apr 03 '19 at 05:01

1 Answers1

0

You can try the following:

navigate to Administration > Settings > Advanced > ContentView > Controls > FrontendPages > Views > FrontendPagesListView > View Modes > TreeTable > Columns > ViewColumn

There, under Client Template you will see something like this:

<a sys:href="{{ (PageLiveUrl) }}" target="_blank">View</a>

From what I see, this PageLiveUrl is resolved by not taking the includeSubfolderPrefixForDefaultLanguage param into account. So, what you can do is to manually remove the language portion:

<a sys:href="{{ (PageLiveUrl).replace('/en/', '/') }}" target="_blank">View</a>

Save and refresh the page.

Veselin Vasilev
  • 3,698
  • 1
  • 15
  • 21