Developer forum

Forum » Development » Creating alternative href links for multiple sites/language layers

Creating alternative href links for multiple sites/language layers

Torben Bak Jensen
Reply

Hi, we have a website in such setup

- .DK site (DA language)
- .NET site (EN, DE)

We have product categories per shop, and we have products which are tied to groups (same products are tied to multiple shops through groups. Products are translated in all three languages). Issue is, we are trying to create alternative urls at the top of category and group pages. We create them by, essentially, calling: 

Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("Default.aspx?ID={0}shopid={1}&GroupID={2}") for group alternative urls

and Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("Default.aspx?ID={0}shopid={1}&ProductID={2}") for product alternative urls (of course inserting values through string.Format as neccessary. 

Group alternative urls work fine, because they are tied to shops. However, product urls look like this:

.net/shop/bracelet--cosmos--gold-color--brown" hreflang="en"
.net/no/shop/bracelet--cosmos--gold-color--brown" hreflang="en-NO" 
.net/se/shop/bracelet--cosmos--gold-color--brown" hreflang="en-SE" 
.net/de/shop/bracelet--cosmos--gold-color--brown" hreflang="de-DE" 
.dk/butik/bracelet--cosmos--gold-color--brown" hreflang="da-DK" 

de-DE and da-DK links should be in Danish, and DW redirects the user to the translated version of the link, once you visit it. If I enter ".dk/butik/bracelet--cosmos--gold-color--brown" product url, it redirects to "dk/butik/armbaand--crossing-lines--guld-farve--brun". But I want this, translated url, to be displayed in my atlernative url list. Instead, all product names in links are in the language of the website I'm viewing. So if I view product page in Danish, all alternative urls will have "armbaand--crossing-lines--guld-farve--brun" as the product name!! This trully makes no sense!

 

 

 


Replies

 
Kenneth Radoor
Reply

Bump.

and an additional question/request.

The above code works fine, but as noted in the post you do not get the translated group/productnames in the path.

Can it be done, or is it not possible.

A feature request could be that the searchengine friendly url was available in the GetLoop("Languages")

 

 

 

 

You must be logged in to post in the forum