Page 1 of 1

2 different menus on the same page -problem

PostPosted: Thu Oct 22, 2009 5:43 pm
by funone
Hi,

I have a 2-language site, one can change language simply by clicking on flags on every page. If the addressbar contain ..?lang=sv then the content should be swedish, otherways english.

I have made 2 different menus in empty php pages and include them by php based on the string in the address bar. It works, almost. The problem is that upon switching between menus something is "left behind", like after hovering on a button, the wrong language button are shown, stretched out and ugly.
I tried to overcome this by putting all the files etc in own language-folders. But if the menu's aren't in the root they don't seem to work if I don't change a little code (the .js and .css) in the empty php files containing the menus. This I could do but now I have problems on getting the pages included inthe content. Simple include ('swedishfolder/menuswe.php') wont work, giving an error that the file doesn't exist.

1. Would it be possible to overcome the problem with wrong language files showing up/ "left behind" using different folders for the language files?
2. How do I include files from sub folders in php, as I don't seem to be able to do it?

Re: 2 different menus on the same page -problem

PostPosted: Thu Oct 22, 2009 9:35 pm
by Karlis
Currently the only procedure that allows this is the following:
http://kb.blumentals.net/kb/index.php?V ... EntryID=75

So you can create a page with two menus following this procedure and then use the generated code in your PHP. Unfortunately due to issue that we will be fixing later, the "Just generate HTML" option can not produce two menus for one page.

Re: 2 different menus on the same page -problem

PostPosted: Thu Oct 22, 2009 10:35 pm
by funone
Thanks, I got it working through different directories for the different menu files anddifferent include files.