Pixellove / Multilanguage main menu problem

GK User
Wed Aug 17, 2011 8:40 pm
Hi,
I have installed the demo content and I am having problem with my main menu located on the top of your template. I have put greek and english languages, created menus in both languages but they do not show on the top menu. Your top menu module had position "mainmenu" which I can't find on the module positions. I tried to write it instead of selecting it but no result. All the other positions are working (top, left, header etc...). But I can't figure out how to put these main menu on the mainmenu position of your template. So I imagine that the mainmenu should also work, if I only knew the way :(
The other positions are not an option.

I've spent hour with no success. Your help will be greatly appreciated :)
User avatar
Fresh Boarder

GK User
Wed Aug 17, 2011 8:49 pm
Hello,

Main Menu position is on the core files of the template, it's a module call.

What you can do, because I've noticed there's still a long road for J!1.6+ to go, is install JoomFish which will help you on that a lot faster, and also display the option to switch to according language either manually, or automatically (GEO detection), that's the easiest way for now.
User avatar
Expert Boarder

GK User
Wed Aug 17, 2011 9:03 pm
Thanks for your reply :)
I was thinking of JoomFish but it looks that it's not for Joomla 1.7 yet. So I'm afraid I am stuck. Do the other templates have the same problem?
User avatar
Fresh Boarder

GK User
Wed Aug 17, 2011 9:11 pm
As far as I know, most recent templates are in the same kind of structure.
User avatar
Expert Boarder

GK User
Wed Aug 17, 2011 9:15 pm
I will submit a support ticket then :)
User avatar
Fresh Boarder

GK User
Wed Aug 17, 2011 9:35 pm
Good.

I can suggest a quick fix if you want, while you don't get a proper response.

You could just find the line of code on the template that calls the Menu, and change it to call as a module, then add on .xml the position like "mainmenu", then assign it to it.

Hope you understood my logic? Basically would make it work as a normal module. I think that you'll have to create a Menu Module to pull it, and save to the new position. It should work.

Just trying to help, I know most templates, but honestly, I just use one, nothing more.
User avatar
Expert Boarder

GK User
Wed Aug 17, 2011 9:49 pm
I understood your logic but...I don't know how to do it :(
I am a graphic designer but a poor web designer. I have played around with CSS before and managed to do very simple things. If I knew what template (there are 3 menu template) what line, what to write etc... I could probably do it. What you say makes sense and is probably the only solution.

I will anyway do some tests and "alchemy" with your idea and try to see where it is! Hope I will not destroy everything and start all over again (it won't be the first time).
User avatar
Fresh Boarder

GK User
Wed Aug 17, 2011 10:04 pm
Well, touching the template will not destroy Joomla, you can always reinstall the template.

As for the changes, as I am a very nice person... 1st do a backup of the files I mention below, in case you "destroy" the template, just re-aupload the original files and you'll be just fine.

2nd open file nav.php on the folder

/layouts/blocks/


find this line of code (around line 23-29):

Code: Select all
<?php if (($this->getParam('menu_enabled', 1) && $gkmenu = $this->loadMenu())) : ?>
<div id="gk-mainnav">
<?php $gkmenu->genMenu($this->getParam('startlevel',0), $this->getParam('endlevel',-1)); ?>
</div>
<?php endif; ?>


and replace it by

Code: Select all
<div id="gk-mainnav">
<jdoc:include type="modules" name="mainmenu" style="none" />
</div>


save, then open

/templateDetails.xml


and add next to the ones on the same block (line 74 would be ok)

Code: Select all
<position>mainmenu</position>


And save.

Then, go to Joomla Administrator, create a new Menu Module, and assign it to to Main Menu. Setup as you wish, and make it assigned to position

mainmenu


And save.

Refresh your site and see if it worked out, if it opened and the menu is there, yet not styled as it should, just seek for the style and apply on the menu.

This is a MAY situation, I do not know which version you're using neither do I have the template installed, actually, I just download it now so that I could help you.

Good luck ;)
User avatar
Expert Boarder

GK User
Wed Aug 17, 2011 10:14 pm
I can't say Thanks enough! It's 2.12 in the morning here but I will give it a try right away!
User avatar
Fresh Boarder

GK User
Wed Aug 17, 2011 10:16 pm
Let me know if it worked or not, I'm sure this can be fixed.

See the thanks button on the posts? Just PRESS IT! :woohoo:
User avatar
Expert Boarder

GK User
Wed Aug 17, 2011 10:24 pm
I am doing it now. The line is different but I will try it anyway.
what I have is:

<?php if($this->getParam('menu_show', 1)) : ?>
<div id="gkMenuNav">
<div id="gkMenu">
<?php
$this->menu->loadMenu($this->getParam('menu_name','mainmenu'));
$this->menu->genMenu($this->getParam('startlevel', 0), $this->getParam('endlevel',-1));
?>
</div>
</div>
<?php endif; ?>
User avatar
Fresh Boarder

GK User
Wed Aug 17, 2011 10:37 pm
I did it and...well the text goes on top of the logo with menu items vertical position. But: your idea is getting me somewhere. At least it shows that it can be done :) (I guess it's a matter of styling and maybe a few more lines of code)

So I will wait to see if there is a better suggestion from support and let you know tomorrow. In any case I will post the solution here so that others can benefit from it.

Thanks again and goodnight
User avatar
Fresh Boarder

GK User
Wed Aug 17, 2011 10:39 pm
Ok, if not, we can see this later on.

I think it's just a matter of adding the style and you should be ok with.

Take care.
User avatar
Expert Boarder

GK User
Thu Aug 18, 2011 12:27 pm
Hello again,

This is the answer I got from support. It works perfectly:)
To make a long story short: I did not realize that I had to create these different language menus INSIDE the main menu. I was creating them outside.

The answer:
When you read this article http://docs.joomla.org/Language_Switche ... Joomla_1.6 you should know that you need 3 different menus (for both languages, english and greek) the mainmenu in Joomla is only one so in the position mainmenu you will always see only menu for both languages, anyway you can resolve it by create in mainmenu one item for both languages and next crate double items for one and another language, then in your top menu after lang switch you will se items only for selected lang.

That's it. I hope it will help another newbie like me.

By the way, if your language is not supported by the font (as it happened to me), you can change it in the template settings and pick for example Arial. It took me a while to figure that out, so I am adding it also here.

Last... (I know I'm pushing my luck) does anyone know by any chance how to put a picture instead of a text in this main menu??? I will eventually manage to do it by myself but your help will save me at least a couple of years ;)
User avatar
Fresh Boarder

GK User
Thu Aug 18, 2011 5:29 pm
Adding a picture you can simple open any menu item, then add a picture to that specific item on the options tab on your right.

Glad you've your issue fixed, most times you caught me at 4am and by then my mind is already totally screwed :whistle:
User avatar
Expert Boarder

GK User
Thu Aug 18, 2011 7:31 pm
Hi again:) hope you feel better now!
I've tried almost all combinations with the tabs on the right without success. I think I am missing something :0
User avatar
Fresh Boarder

GK User
Tue Sep 20, 2011 2:31 pm
studiozip wrote:Hi again:) hope you feel better now!
I've tried almost all combinations with the tabs on the right without success. I think I am missing something :0
Did you find some solution? Right now I'm facing same problem :(
User avatar
Fresh Boarder

GK User
Fri Sep 23, 2011 6:34 am
No unfortunately I did not. I got tired of searching + not being able to handle the main menu as I needed. I replaced the template with another one that gave me more control and flexibility to handle my site as needed. It took me less time.
User avatar
Fresh Boarder

GK User
Sat Oct 08, 2011 3:55 pm
Hi all,

Simple replace in nav.php block
line 26:
$this->menu->loadMenu($this->getParam('menu_name','mainmenu'));

by:
$this->menu->loadMenu('mainmenu'.JRequest::getVar('lang'));

now just create menu types for each language like:

mainmenuen for english
mainmenupt for portuguese
mainmenufr for french

etc..etc..
User avatar
Fresh Boarder

GK User
Fri Oct 21, 2011 3:57 pm
studiozip wrote:Hello again,

This is the answer I got from support. It works perfectly:)
To make a long story short: I did not realize that I had to create these different language menus INSIDE the main menu. I was creating them outside.

The answer:
When you read this article http://docs.joomla.org/Language_Switche ... Joomla_1.6 you should know that you need 3 different menus (for both languages, english and greek) the mainmenu in Joomla is only one so in the position mainmenu you will always see only menu for both languages, anyway you can resolve it by create in mainmenu one item for both languages and next crate double items for one and another language, then in your top menu after lang switch you will se items only for selected lang.

That's it. I hope it will help another newbie like me.

By the way, if your language is not supported by the font (as it happened to me), you can change it in the template settings and pick for example Arial. It took me a while to figure that out, so I am adding it also here.

Last... (I know I'm pushing my luck) does anyone know by any chance how to put a picture instead of a text in this main menu??? I will eventually manage to do it by myself but your help will save me at least a couple of years ;)


I have my page set up this way - menu for ET, menu for FI and menu ALL, where items are duplicated. But in Menu ALL i also must have a Default Home Item, which shows up in all language menus, but it is static text, it wont change language, since it must be Language -ALL. How can i hide this first menu item?

Thanks!
User avatar
Senior Boarder


cron