0

I would like to simplify SEF URLs of menu items in lower levels of my menu by omitting the parent menu item alias from the URL.

I installed the Direct Alias plugin, which should be doing exactly this thing, but I have a strange problem with it: When I use the plugin to set a lower level menu item alias as 'direct', then in the frontend display the item is moved from dropdown to the top level menu. Or when I set the plugin to automatically affect all menu items, they are all put to the top level. I suspect this might be caused by Gantry 5 (I'm using a Gantry menu particle for the main menu), because in an ordinary Joomla menu module the plugin works fine.

Is this a known issue? Is there any workaround? Or is there any alternative to the Direct Alias plugin to achieve this?

2 Answers 2

1

The simplest option may be to create a new menu which doesn't have an associated module (call it something like 'hidden'). This menu will not appear on the front of the site, but its items can still be loaded by going directly to the URLs you have set up within it.

Place any pages you want to appear at a root level in this menu, and then create a menu item alias where you want the page to appear in the dropdown of your visible menu. The URL will then come from the hidden menu item and not the alias menu item, and thus the URL will be based in the root.

This avoids having to use any third party plug-ins - using core Joomla whenever possible is good practise for security, so delete any unused ones.

If you have hundreds of pages then this may not be practical, though if it is only for SEO, I'd question if root level URLs really do make any difference - there's so much hearsay out there and I can't think of any logical reason why Google would care.

2
  • Thank you, this works well enough as described, only it then affects breadcrumbs (which I understand is logical).
    – Matej
    Apr 10, 2017 at 12:28
  • I wanted it more for having pretty and simple human-readable URLs for important sections, because some URLs seemed too wordy. But maybe I'll stick with the default way.
    – Matej
    Apr 10, 2017 at 12:37
1

There are few ways to do it without any plugins:

  • Create a detached menu (menu without any module) and add there the menu items you want to have a short URL.
  • Use Redirects component to create a redirection from for example /iphone to /products/smartphones/apple/iphone. That way you don't have to change menu structure
  • Create a menu item in one of the menus as a top-level menu item and disable it from displaying in the module using /Link Type/Display in Menu/No option in menu item options.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.