Magento Open Source 2.2.x

Magento 2.2.x Notice: As outlined by the Magento Software Lifecycle Policy, Magento 2.2.x has reached the End-of-Support and will no longer receive quality fixes or documentation updates. To maintain your site's performance, security, and PCIPayment Card Industry: Refers to debit and credit cards and their associated businesses. compliance, upgrade to the latest version of Magento.

The online Magento 2.2.x User Guide is scheduled for removal, but will remain available in PDF for Open Source, Commerce, and Commerce for B2B.

Top Navigation

The main menu of your store is like a directory to the different departments in your store. Each option represents a different categoryA set of products that share particular characteristics or attributes. of products. The position and presentation of the top navigationThe primary group of web page links that a customer uses to navigate around the website; the navigation links to the most important categories or pages on an online store. might vary by themeA package that contains graphics and appearance information, and customizes the look and feel of the store., but the way it works is essentially the same.

Top Navigation

The category structure of your catalog can influence how well your site is indexed by search engines. The more deeply nested a category, the less likely it is to be thoroughly indexed. As a general rule, anywhere between one and three visible levels is considered to be the most effective. The root category counts as the first level, although it doesn't appear in the menu. The maximum number of levels that are available in the top navigation is determined by the configuration. In addition, there might be a limit to the number of menu levels that are supported by your store theme. For example, the sample Luma theme supports up to five levels, including the root.

  • Counting Menu Levels

    Level 1

    The first level is the root category, which in the sample data is named “Default Category.” The root is a container for the menu, and its name does not appear as an option in the menu.

    Level 2

    On a desktop display, the top navigation is the main menu that appears across the top of the page. On a mobile device, the main menu typically appears as a fly-out menu of options. The second-level options in the Luma store are “What's New,” “Women,” “Men,” “Gear,” “Training,” and “Sale.”

    Level 3

    The third-level appears below each main menu option. For example, under “Women,” the third-level options are “Tops” and “Bottoms.”

    Level 4

    The fourth-level options are subcategories that fly out from a third-level option. For example, under “Tops,” the fourth level menu options are “Jackets,” “Hoodies & Sweatshirts,” “Tees,” and “Bras & Tanks.”

To set the top navigation:

To set the depth of the top navigation:

1. On the Admin sidebar, tap Stores. Then under Settings, choose Configuration.
2. In the panel on the left, expand Catalog. Then, choose Catalog.
3. Expand the Category Top Navigation section.

Because the depth of the top navigation has a global configuration scope, the setting applies to all websites, stores, and store views in the Magento installation. The Category Top Navigation configuration section is available only when Store View in the upper-left corner is set to “Default Config.”

Default Config
4. To limit the number of subcategories that appear in the top navigation, enter the number in the Maximal Depth field.

The default Maximal Depth value is zero, which does not place a limit on the number of subcategory levels.

5. When complete, tap  Save Config .