Loading categories in the catalog browsing menu
You can override the behavior for loading the catalog browsing menu on individual store pages to control the display of the menu and improve the performance of loading store pages. By configuring the behavior for the catalog browsing menu, you can configure whether a store page loads only the top-level category in the catalog browsing menu when the page loads or loads all categories in the menu. The catalog browsing menu is a pop-up menu that includes a list of departments and categories.
About this task
To control the behavior of the menu on individual pages, you must first set the behavior of the
menu for all store pages. To control this behavior for all store pages, you can configure the
lazyLoadDepartmentsList
variable in the EnvironmentSetup.jspf
file for your store. For more information about this file and the variables that you can configure
within the file, see Commonly used JSTL variables in starter store pages.
With the lazyLoadDepartmentsList
variable, you can configure store pages to load
only the top-level category in the catalog browsing menu upon the loading of a page. If you set
pages to load only the top-level category, the remaining categories in the menu do not load until a
shopper clicks the menu. By waiting to load the remaining categories upon the click action, you can
improve the performance of loading the store pages during the initial page load. You can then
override this setting for individual pages when you want to display the entire list of categories
upon loading the store page. To override the setting on individual pages, use the
overridelazyLoadDepartmentsList
variable in the definition of a header wrapper for
the individual store page.
For example, you can set the value for the lazyLoadDepartmentsList
variable to
true
for your store, but override the setting for your home page with the
overridelazyLoadDepartmentsList
variable. With these settings, your home page
displays the entire category list, but all other pages display only the top-level category and the
performance of loading the pages can improve.