ASPX templates
Version 5.x > ASPX templates > CMSListMenu for different cultures View modes: 
User avatar
Member
Member
Vika - 9/13/2011 1:49:15 PM
   
CMSListMenu for different cultures
I have a kentico installation with 2 sites both with 2 cultures:
Site 1 - Company:
company.com (en-us, default)
company.co.uk (en-gb)
Site 2 – Company Downloads:
downloads.company.com (en-us)
downloads.company.co.uk (en-gb)

These are 2 distinct sites in kentico.

I have a top navigation menu (using CMSListMenu) at the top of the pages on both sites. Since I wish the Company Downloads Site menu to look exactly the same as the Company site I specify the SiteName property of the CMSListeMenu on the Company Downloads master page to “Company” and if the current culture is ‘en-gb’ I also set this as the CultureCode. This works well for the .com page but causes issues for the .co.uk. All the menu items on the .co.uk list menu are displaying .com links. The links technically work as I reach the pages in ‘en-gb’ culture however both the address bar and the links are displaying .com, which is incorrect.

I need the links on the menu for downloads.company.co.uk to reflect .co.uk pages, is there a property I am forgetting?

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 9/14/2011 3:55:59 AM
   
RE:CMSListMenu for different cultures
Hi,

I discuss this behavior with our developer and situation you have described is very specific. To achieve your goal - have a link with culture specific domain name you can use a repeater web part and define its transformation. If your site content has more levels you could you use a nested repeaters or create a custom web part.
Our developer confirms that this behavior is by design - it is required by many other components so we cannot change it in the solution.

Best regards,
Ivana Tomanickova

User avatar
Member
Member
•●♥๑ஐ♥ღ Victoria ღ♥ஐ๑♥●• - 9/14/2011 9:06:19 AM
   
RE:CMSListMenu for different cultures
Hi,

Thank you for prompt response. I actually managed to solve the problem this way:

In SetupControl() method of CMSListMenu I changed:

this.menuElem.SiteName = this.SiteName;
to
this.menuElem.SiteName = CMS.CMSHelper.CMSContext.CurrentSiteName;

It now works fine for all my sites.