Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Url for catalogue driven page

Vote:
 

var url = Url.PageLinkUrl(content);

This always returning "SEO URL" for catalog node pages. Instead this should return me 
/{2letter culture}/Name In Url.

e.g. 

/gb/food-ingredients

Any one knows about this.

#190012
Edited, Mar 29, 2018 11:39
Vote:
 

Hi Dipak - Catalog routing is detailed here in Developer Guides: 

https://world.episerver.com/documentation/developer-guides/commerce/routing/

In general, if you are using the hierarchical router, it will attach a language segment based on the Site Host Mapping configuration in the CMS Admin mode.

A simple example:

If you have a domain configured for a specific language and the current request is on that domain, you won't see a language segment in the URL.

If you have a single domain for all languages and the current request is on that domain, you should see a language segment in the URL.

I also suggest you use IUrlResolver directly if you are working within a Controller. See: https://world.episerver.com/documentation/class-library/?documentId=cms/10/8F74D57D

What routing configuration are you using?

#190044
Edited, Mar 29, 2018 16:07
Vote:
 

Thank you Matthew.

#190242
Apr 06, 2018 7:17
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.