Need another Simple Menu

Editor
May 24, 2012 at 10:30 PM

I just realized that the simple menu applies for all pages and all templates, I need it to be separate for different languages. How can I do this?

 

Coordinator
May 25, 2012 at 1:39 PM
Edited May 25, 2012 at 1:40 PM

1) You could add extra column in db. ex. LangVer, modify the simple menu in control panel , so when user adds new record he has to select lang.

then you have to change SimpleMenu helper (App_Code/rcHelpers.cshtml)

@helper SimpleMenu(string LangVer) {.....of course you have to change the sql query to pull only records based on the LangVer 

and then in you templates when you call SimpleMenu you should pass language as parameter ex. @rcHelpers.SimpleMenu("en")

 

2) 2nd option is to create widget for every menu, ex. menu_en as html widget (paste html for the menu to that widget) and do this for every lang. ver.

 then in the layout page remove simple menu and put the @renderSection("rcMenu", false) in that place

now you can create pages and put the menu you want in rcMenu zone

Editor
May 25, 2012 at 2:48 PM
razorc wrote:

1) You could add extra column in db. ex. LangVer, modify the simple menu in control panel , so when user adds new record he has to select lang.

then you have to change SimpleMenu helper (App_Code/rcHelpers.cshtml)

@helper SimpleMenu(string LangVer) {.....of course you have to change the sql query to pull only records based on the LangVer 

and then in you templates when you call SimpleMenu you should pass language as parameter ex. @rcHelpers.SimpleMenu("en")

 

2) 2nd option is to create widget for every menu, ex. menu_en as html widget (paste html for the menu to that widget) and do this for every lang. ver.

 then in the layout page remove simple menu and put the @renderSection("rcMenu", false) in that place

now you can create pages and put the menu you want in rcMenu zone

 

I made a new .cshtml page in rcTemplates with my navigation bar code, then made a new widget based on that template, and added to the default page. So it all works. Is this good, or will I have problems in the feature?