How to get SEF's Without Menu Item Being Listed

Discuss Search Engine Optimization in relation to Joomla! 2.5. This forum will also have discussions on SEF/SEO Joomla! 2.5 extensions.

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.
Locked
ToonGuns
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Sat Jul 27, 2013 6:23 pm

How to get SEF's Without Menu Item Being Listed

Post by ToonGuns » Tue Mar 31, 2015 5:50 pm

Hi All,

Just an thank you in advance for any help.

I am trying to restructure some of the URL's on my website so that, at least in google's eyes, the structure is more "pyramidal" and makes more sense.

The problem I am coming up against is that I don't necessarily want all pages linked from the menu of the site, as the drop-down menu will be massive... so how is it possible to control the SEF URL's and specify what they are, without the pages appearing in the menu?

For example, if I have a page currently that is:

http://www.site.com/parent-page/child-page

How to I keep the "Child Page" article at this URL, without having to have the item listed in the menu at:

Home > Parent > Child

?

Much appreciated

Regards

User avatar
NathanHawks
Joomla! Ace
Joomla! Ace
Posts: 1900
Joined: Wed Oct 02, 2013 6:17 pm
Location: Washington state, U.S.
Contact:

Re: How to get SEF's Without Menu Item Being Listed

Post by NathanHawks » Tue Mar 31, 2015 8:03 pm

The answer: hidden menus.

Say you have in your Menu Manager, MainMenu and SEOMenu. You would present a module in your front-end for MainMenu, but you would not issue a module for SEOMenu.

Build your MainMenu normally.

Then duplicate everything from your MainMenu, into your SEOMenu, but use the menu item type System Links -> Menu Item Alias, for every link you're duplicating. Duplicate the entire structure (only the items you need to add children to in this way -- it's not necessary to duplicate the WHOLE menu, just items you need to affix children to). Nest them appropriately (meaning, mirror the same tree structure) just like they are in MainMenu, but with every entry being a Menu Item Alias, each pointing at its MainMenu counterpart.

Then, add the links which you want not shown in the MainMenu (drop down), as their "actual selves" (not as Menu Item Aliases. Put them in SEOMenu under the appropriate branch in your tree structure.

In addition to accomplishing what you want with URLs, this will also give your users the appropriate menu style hints, to show them which section of the website they are in -- despite having arrived at a page which technically is not "in" the MainMenu, because its parent is acknowledged as being both the SEOMenu alias, and the MainMenu real item.
Save time - hire me for your Joomla to-do list! http://nathanhawks.us/joomla

ToonGuns
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Sat Jul 27, 2013 6:23 pm

Re: How to get SEF's Without Menu Item Being Listed

Post by ToonGuns » Tue Mar 31, 2015 9:36 pm

Thanks for the answer. But aaargh. Still can't get it to work! I'm getting 404 errors.

This is what I've done:

Main Menu is set up:

Menu>Parent>Child

I created a new menu item in the SEO "hidden" menu for both the MENU and PARENT, and made them both "menu item alias". Then for the "child" item I created an article link, and positioned it under the PARENT in the SEO menu.

do the alias's need to be the same?

much appreciated

ToonGuns
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Sat Jul 27, 2013 6:23 pm

Re: How to get SEF's Without Menu Item Being Listed

Post by ToonGuns » Tue Mar 31, 2015 9:41 pm

Do I need to create a "home" alias entry to mimic the "home" on the main menu (i.e. site.com)?

User avatar
NathanHawks
Joomla! Ace
Joomla! Ace
Posts: 1900
Joined: Wed Oct 02, 2013 6:17 pm
Location: Washington state, U.S.
Contact:

Re: How to get SEF's Without Menu Item Being Listed

Post by NathanHawks » Tue Mar 31, 2015 9:55 pm

1. You only need to reproduce in SEOMenu, the items involved in your nested structure. E.g. if Home is just one item with no children, or more to the point if Home does not need to be expanded with "hidden sub-links" as I'll call them for this purpose, you do NOT need to reproduce Home in SEOMenu. Only items which need "hidden sub-links" need be replicated.
2. The alias fields on the Menu Item Alias items cannot be the same as their "real" counterparts ... but they will be treated as the same. The URL will be as if you clicked the "real" item.
3. The alias field of the article item should be whatever you want after the other parts of the URL; just the last bit after the final slash for the direct parent item.

If the method above hasn't worked, you may need to swap the instructions slightly --- move the real items to the SEOMenu and the fake items to the MainMenu. I thought it worked both ways but the router is undergoing changes and haven't done this specific thing in a few weeks.

Be aware that not only does the structure need to be the same, but I want to clarify something else as well -- you mentioned adding an alias "for both the menu and parent" ... but there should not be "an alias for the menu." My point here is that the nesting structure must be exactly the same. To spell it out a bit clearer:

Example:

(MainMenu)
(Menu item root)
-> Blogs (Featured Articles)
---> Basic (Category Blog)

(SEOMenu)
(Menu Item root)
-> Blogs (Menu Item Alias)
---> Basic (Menu Item Alias)
-----> Easy as 123! (Article)

Again, if the above isn't working (and you aren't inserting additional layers to throw the parity off-sync) then you may need to reverse it:


(MainMenu)
(Menu item root)
-> Blogs (Menu Item Alias)
---> Basic (Menu Item Alias)

(SEOMenu)
(Menu Item root)
-> Blogs (Featured Articles)
---> Basic (Category Blog)
-----> Easy as 123! (Article)

Note also that even if you swap things in that fashion, you still don't need to replicate anything unless it needs "hidden sublinks" -- meaning that the items in MainMenu will be the "real items" unless that part of the menu needs "hidden sublinks."
Save time - hire me for your Joomla to-do list! http://nathanhawks.us/joomla

ToonGuns
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Sat Jul 27, 2013 6:23 pm

Re: How to get SEF's Without Menu Item Being Listed

Post by ToonGuns » Tue Mar 31, 2015 9:59 pm

I'm using joomla 2.5. Maybe I need to swap like you said... let me try. Either way I'll let you know - and thank you so much.

ToonGuns
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Sat Jul 27, 2013 6:23 pm

Re: How to get SEF's Without Menu Item Being Listed

Post by ToonGuns » Tue Mar 31, 2015 10:16 pm

Yes the reverse seems to work.

Will take forever to re-edit the menu though!... but at least I know how to do it. I'll try tomorrow and see if I run into any problems.

Thank you so much.

User avatar
NathanHawks
Joomla! Ace
Joomla! Ace
Posts: 1900
Joined: Wed Oct 02, 2013 6:17 pm
Location: Washington state, U.S.
Contact:

Re: How to get SEF's Without Menu Item Being Listed

Post by NathanHawks » Tue Mar 31, 2015 11:06 pm

I believe the fastest way to do this is to edit each item and change its parent. You can do "the whole job" for each item in one step per item, this way, because it lets you choose a parent from any menu.

As I haven't done this in a few weeks I can't be sure, but you may be surprised how fast you're done using that method --- the child items might be carried along-with if you move the parent item (to Menu Item Root under its new menu home) first.
Save time - hire me for your Joomla to-do list! http://nathanhawks.us/joomla


Locked

Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 2.5”