Multilingual Site Main Menu Home Menu Item Does Not Get Active Class

General questions regarding the use of languages in Joomla! 4.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
User avatar
JTema
Joomla! Guru
Joomla! Guru
Posts: 733
Joined: Sun Apr 13, 2008 8:10 pm

Multilingual Site Main Menu Home Menu Item Does Not Get Active Class

Post by JTema » Sun Oct 22, 2023 11:21 am

Hi
Main Menu Home Menu Item Does Not Get Active Class on a Multilingual Site. I am not so familiar with multilingual sites but is that normal? I have a fresh Joomla 4 installation. I have a main menu then Installed multilingual sample data activated language switcher module. Everything seems normal. But when on homepage main menu home item does not get active class. Is that because default language menu's default item gets active class is not it? Thanks.
http://www.joomlatema.net - Joomla Extensions and Templates
https://asgardia.joomlatema.net - Asgardia Joomla Gardening Template

gws
Joomla! Champion
Joomla! Champion
Posts: 6042
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: Multilingual Site Main Menu Home Menu Item Does Not Get Active Class

Post by gws » Sun Oct 22, 2023 11:47 am

Do you have to assign a language to each menu item when a site is multilingual?

User avatar
JTema
Joomla! Guru
Joomla! Guru
Posts: 733
Joined: Sun Apr 13, 2008 8:10 pm

Re: Multilingual Site Main Menu Home Menu Item Does Not Get Active Class

Post by JTema » Sun Oct 22, 2023 11:57 am

gws wrote:
Sun Oct 22, 2023 11:47 am
Do you have to assign a language to each menu item when a site is multilingual?
They are assigned and ready. I am talking about main menu's home item before multilingual sample data was installed.
Screenshot_1.png
Screenshot_2.png
Screenshot_3.png
You do not have the required permissions to view the files attached to this post.
http://www.joomlatema.net - Joomla Extensions and Templates
https://asgardia.joomlatema.net - Asgardia Joomla Gardening Template

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31057
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Multilingual Site Main Menu Home Menu Item Does Not Get Active Class

Post by Per Yngve Berg » Sun Oct 22, 2023 12:32 pm

The Default Menu Item marked with a Yellow Star is not used in a Multi language site. Instead the Menu Items marked with Flags are used. The Module that displays the Main Menu shall be disabled.

User avatar
JTema
Joomla! Guru
Joomla! Guru
Posts: 733
Joined: Sun Apr 13, 2008 8:10 pm

Re: Multilingual Site Main Menu Home Menu Item Does Not Get Active Class

Post by JTema » Mon Oct 23, 2023 3:09 pm

Thanks Per so it is true just home items of each language gets active class on a multilingual site your main menu home item does not.
http://www.joomlatema.net - Joomla Extensions and Templates
https://asgardia.joomlatema.net - Asgardia Joomla Gardening Template

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2762
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Multilingual Site Main Menu Home Menu Item Does Not Get Active Class

Post by ceford » Tue Oct 24, 2023 6:46 pm

Your Main menu en-GB of xx-XX or whatever you have called it does get the active class. Here is an example from my multi-lingual menu with French selected:

Code: Select all

<div class="sidebar-right card ">
     <h3 class="card-header ">Main menu fr-FR</h3>
          <div class="card-body">
              <ul class="mod-menu mod-list nav ">
                  <li class="nav-item item-106 default current active">
                      <a href="/j44/index.php/fr/" aria-current="page">Accueil</a>
                  </li>
              </ul>
        </div>
</div>


Post Reply

Return to “Language - Joomla! 4.x”