Developer forum

Forum » CMS - Standard features » Navigating to / removes language choice

Navigating to / removes language choice

Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

On a website where the navigation URL of the logo is set to /

When I click the logo and go to the homepage the language choice is lost, and the website is back in the default language.

What do I need to change to stay in the chosen language?

Thanks,

Justin


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Depends - it is probably the link on the logo that does not point to the frontpage.

How does the template look like in this place?

On pageviewmodel you have "Firstpageinwebsite" property which will give you the frontpage of the current website.

 
Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

I'm using the default Swift_Logo template. 

It contains the following code to get the url for the link on the logo:

if (logoLink != null) { 
logoLink.Url = logoLink.Url == "/" && Pageview.IsVisualEditorMode ? "/Default.aspx?AreaID=" + Pageview.Area.ID : logoLink.Url;
}
 
I've tried linking to "/" and an internal link to the Home item, but in both cases the laguage is lost.
So as per usual, I have probably managed to brake things on a different place :-)
 
Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

Seems something went wrong during translations, after relinking alle logo's in all languages to their respective language version it now works correctly. 

I hoped it was just defining a / for the link, but for that maybe the template in Swift has to change to accomodate that...

 

You must be logged in to post in the forum