Issue with alias and urls in the main menu

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
User avatar
joomfriend
Joomla! Explorer
Joomla! Explorer
Posts: 284
Joined: Sun Feb 08, 2009 5:10 pm
Contact:

Issue with alias and urls in the main menu

Post by joomfriend » Sat Jul 25, 2020 5:03 am

Hello,

I am working on a site (Latest Joomla version) with many menu items in the main menu. (about 12 or 14 of them).

Example: Home | About us | Services | Products | Forum | Downloads | Support | Resources etc.

They cannot all fit horizontally at the header (menu bar) because there are also the logo and the search module in the menu bar. So I am trying to show only 4 of them and the remaining ones in a drop-down menu item with the name: 'More' like this:

Home | About us | Services | Products | More

Here are some examples of sites I came across that use the 'More' menu item in the main menu to show more menu items:

etsi[dot]org
bethelbaptistrota[dot]com
google[dot]com
bbc[dot]com

To try to achieve what I have explained above, I created a menu item Text Separator (a placeholder) in the main menu and I called it: 'More' (It’s the parent menu item). Then I created other submenu items under it. Example: Forum, Downloads, Support, Resources etc.

The 'More' menu item works as expected but the only problem is that its alias 'more' is added to all the submenu URLs I created. Example:

site[dot]com/more/forum
site[dot]com/more/downloads
site[dot]com/more/support
site[dot]com/more/resources

That is weird. I think it was not supposed to work like that since it is just a placeholder. Most of the websites I visited that use the 'More' menu item in the main menu don’t add the word 'more' to the menu item urls.

Same applies if I set the 'More' menu item as a 'Menu Heading Item' or 'External URL menu item' type with hash (“#”) in the 'Link' field.

I might be missing something or doing things wrong. I need some orientations. Please help.

How to use the 'More' menu item as a placeholder to show more menu items in a drop-down manner without adding the word 'more' (alias) to the created menu items in that drop-down menu?

Thanks in advance.

Regards

 
User avatar
joomfriend
Joomla! Explorer
Joomla! Explorer
Posts: 284
Joined: Sun Feb 08, 2009 5:10 pm
Contact:

Re: Issue with alias and urls in the main menu

Post by joomfriend » Thu Jul 30, 2020 5:40 am

Hello,

Does anyone have an idea? Please advise. Thanks

User avatar
AMurray
Joomla! Champion
Joomla! Champion
Posts: 6023
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Issue with alias and urls in the main menu

Post by AMurray » Thu Jul 30, 2020 9:42 am

We really need to see your live site to understand your explanation (the lack of which probably explains the lack of responses, and that this is a volunteer-run forum).

I think what you have is expected behaviour - yes the menu item title becomes part of the SEF URL. That might be a joomla thing; those other sites mentioned probably don't use Joomla as their CMS, so probably work differently.
Regards,
--------------------------------------------------------------
A Murray
Help you I can, yes!. Post your question, you should. Keep it on topic you must!
Use the Forc....Forum Post Assistant my young Padawan!

User avatar
AMurray
Joomla! Champion
Joomla! Champion
Posts: 6023
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Issue with alias and urls in the main menu

Post by AMurray » Thu Jul 30, 2020 9:51 am

Even if you make the "More" a menu heading only (not linkable) and only the child items as linked menu items, it still does the same thing, places "more" in the URL.
You do not have the required permissions to view the files attached to this post.
Regards,
--------------------------------------------------------------
A Murray
Help you I can, yes!. Post your question, you should. Keep it on topic you must!
Use the Forc....Forum Post Assistant my young Padawan!

User avatar
AMurray
Joomla! Champion
Joomla! Champion
Posts: 6023
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Issue with alias and urls in the main menu

Post by AMurray » Thu Jul 30, 2020 9:59 am

Sorry for third response, but I have come across an extension that may fix your particular issue (even though in Joomla, the way it behaves is by design).

Try the extension below, which allows you to remove the parent menu item part of the URL i.e. the word "more" will be taken out, and you're left with the URL that only has the child-menu-item part of the URL.

https://extensions.joomla.org/extension/direct-alias/
Regards,
--------------------------------------------------------------
A Murray
Help you I can, yes!. Post your question, you should. Keep it on topic you must!
Use the Forc....Forum Post Assistant my young Padawan!

User avatar
joomfriend
Joomla! Explorer
Joomla! Explorer
Posts: 284
Joined: Sun Feb 08, 2009 5:10 pm
Contact:

Re: Issue with alias and urls in the main menu

Post by joomfriend » Fri Jul 31, 2020 9:30 pm

Hey AMurray.

I really appreciate your time to answer me. Thank you.

The site is still underconstruction and it is not avalaible for public yet.

Maybe I didn't express myself well. I have a main menu with 12 to 14 top-level items. I would like to display only four of them (because I don't have enough space in the horizontal menu bar in the header which alreay contains the logo and a search box) and then display the ten remaining ones (menu items) in a drop-down with the title 'More' as seen in the sites below:

www.etsi.org
www.bethelbaptistrota.com
www.google.com
www.bbc.com

On these sites, you can see the drop-down menu item: 'More' with the remaining menu items which didn't fit horizontally because of the space in the main menu bar.

It's a comon practice used nowadays when building the main navigation bar. It consists of displaying the most important menu items, rather than overwhelming users with so many menu items. Also it saves space and makes the site look clean. Those looking for additional items will have to click on the drop-down menu item: 'More'.

Maybe my approach to create such a navigation bar is wrong. I've been trying to put the remaining menu items in a placeholder called 'More' but the word 'more' is beeing added to the url. Same applies if i use the 'Menu Heading Item' or 'External URL menu item' setting.

Yes you are right. Later I realize that it's a Joomla thing.

I already have the Sh404sef extention installed that also does the very same thing than the extension you suggested. I don't want to use an extention to remove the parent menu item part of the URL because i am building a multilingual site with many parent menu items and each one has many chield-menu items. Things might easily get out of control. I don't want to mess up the main menu.

I have seen some joomla sites successfully doing what I am trying to do without adding 'more' to the URL. I just can't figure out how they did it. Maybe they have created two main menus: One with the 4 menu items that they want to always be shown and another one that will be displayed in the drop-down menu under 'More'. Maybe, I am just speculating.

Well, it's where I am stuck. Any idea?

Thanks!

User avatar
AMurray
Joomla! Champion
Joomla! Champion
Posts: 6023
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Issue with alias and urls in the main menu

Post by AMurray » Fri Jul 31, 2020 10:59 pm

I explained the solution above (per my interpretation of your question)......but as to doing the "hidden menu" that toggles open and closed when clicking "More" that is a different thing altogether......an answer I don't have.
Regards,
--------------------------------------------------------------
A Murray
Help you I can, yes!. Post your question, you should. Keep it on topic you must!
Use the Forc....Forum Post Assistant my young Padawan!

User avatar
AMurray
Joomla! Champion
Joomla! Champion
Posts: 6023
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Issue with alias and urls in the main menu

Post by AMurray » Fri Jul 31, 2020 11:04 pm

Here's an example of the action I think you're trying to achieve: Your "More" button is acting as a trigger to hide or show the secondary menu. The example below does the hide/show element part, but I'm not sure how you would integrate that into your menu system.

https://www.w3schools.com/howto/tryit.a ... _hide_show
Regards,
--------------------------------------------------------------
A Murray
Help you I can, yes!. Post your question, you should. Keep it on topic you must!
Use the Forc....Forum Post Assistant my young Padawan!

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 39057
Joined: Sat Apr 05, 2008 9:58 pm

Re: Issue with alias and urls in the main menu

Post by Webdongle » Sat Aug 01, 2020 2:12 am

Set the Parent menu item for each menu item that you don't want on the top level.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein.

User avatar
joomfriend
Joomla! Explorer
Joomla! Explorer
Posts: 284
Joined: Sun Feb 08, 2009 5:10 pm
Contact:

Re: Issue with alias and urls in the main menu

Post by joomfriend » Sat Aug 01, 2020 6:32 am

AMurray wrote:
Fri Jul 31, 2020 11:04 pm
Here's an example of the action I think you're trying to achieve: Your "More" button is acting as a trigger to hide or show the secondary menu. The example below does the hide/show element part, but I'm not sure how you would integrate that into your menu system.

https://www.w3schools.com/howto/tryit.a ... _hide_show
Thanks AMurray. Rather than using a button to toggle between hiding and showing, i will go for a drop-down menu. Yes, using code will be tricky as i won't be able to integrate that into the menu system.

The Joomla menu system is very limited. Will template frameworks like Gantry for example be able to do what I am trying to achieve? Do they have a menu builder with a way to individually manipulate menu items? Thanks

User avatar
joomfriend
Joomla! Explorer
Joomla! Explorer
Posts: 284
Joined: Sun Feb 08, 2009 5:10 pm
Contact:

Re: Issue with alias and urls in the main menu

Post by joomfriend » Sat Aug 01, 2020 6:37 am

Webdongle wrote:
Sat Aug 01, 2020 2:12 am
Set the Parent menu item for each menu item that you don't want on the top level.
Hi Webdongle. Thanks for your reply. Would you mind explaining it more clearly? I didn't get you well. Thanks!

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 39057
Joined: Sat Apr 05, 2008 9:58 pm

Re: Issue with alias and urls in the main menu

Post by Webdongle » Sat Aug 01, 2020 9:25 am

If you wanted
Dogs as a menu item at the top
with
Poodles and Alsations as menu items in a dropdown
then
In the menu item edit screen set Dogs as the parent of Poodles ... do the same for Alsations.

Joomla's menu is not limited and can be configured as a drop down.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein.

User avatar
joomfriend
Joomla! Explorer
Joomla! Explorer
Posts: 284
Joined: Sun Feb 08, 2009 5:10 pm
Contact:

Re: Issue with alias and urls in the main menu

Post by joomfriend » Sun Aug 02, 2020 10:49 pm

Thanks Webdongle but I'm afraid that you didn't understand me correctly.

What about if I have parent menu items like: Dogs | Cats | Birds | Horses, each one with child menu items like this:

Dogs
- Alsatian
- Poodle

Cats
- Persian
- Siamese

Birds
- Budgies
- Parrotlets

Horses
- Arabian
- Quarter Horse

and I would like the horizontal menu bar (main menu) to display the first two parent menu items (Dogs | Cats) normally and to display the two remaining parent menu items (Birds | Horses) in a drop-down under the word (menu item) 'More' without 'more' being added to the url?

Do you have an idea on how to do it with the Joomla menu system?

Thanks

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 39057
Joined: Sat Apr 05, 2008 9:58 pm

Re: Issue with alias and urls in the main menu

Post by Webdongle » Sun Aug 02, 2020 11:18 pm

" display the two remaining parent menu items (Birds | Horses) in a drop-down under the word (menu item) 'More' without 'more' being added to the url?"

Perhaps create a hidden menu with 'menu items (Birds | Horses)' as top level items then make the child items (of 'More' Menu) item type 'Alias'?
Not tried it but you could give it a go?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein.

User avatar
joomfriend
Joomla! Explorer
Joomla! Explorer
Posts: 284
Joined: Sun Feb 08, 2009 5:10 pm
Contact:

Re: Issue with alias and urls in the main menu

Post by joomfriend » Tue Aug 04, 2020 10:28 pm

Thanks Webdongle. Sounds smart but The problem is I am building a multilingual site with many parent and child menu items. Many hidden menu items and menu duplication might be difficult to manage. I don't want to make the menu look messy. Anyway I will think about your approach. Thanks.

 

Post Reply

Return to “General Questions/New to Joomla! 3.x”