HomeWiki
HomeWiki
  1. Navigation
  • Back to home
  • 1. Themes
  • Layout
    • New Layout
    • Legacy Layout
  • Components
    • Announcement
    • Banner Carousel
    • Banner With Products Carousel
    • Blog Category List
    • Blog List
    • Brand List
    • Brands Carousel
    • Breadcrumb
    • Call To Action
    • Cart
    • Categories List
    • Change Password
    • Checkout
    • Cookie Manager
    • Filter list
    • Footer
    • Forgot Password
    • Form
    • Hero Carousel
    • Icon Block
    • Invitation
    • Last Visited Products
    • Layout
    • Login
    • Map
    • Nav Bar
    • Offer
    • Product Attachments
    • Product Attributes
    • Product Documentation
    • Product Expected
    • Product Modal
    • Products Block
    • Products Carousel
    • Product Single
    • Profile
    • Quote
    • Register
    • Related Products
    • Search
    • Stores
    • Subscribe Newsletter
    • Text with Image
    • Top Bar
    • Video
  • Reusables
    • Getting Started
  • Assets
    • Getting Started
  • SDK
    • Products
      • _findProductsByCategory
      • _findProductsByIds
      • _findProductsByTitle
      • _findProductsByFilter
      • _findProductsByCriteria
      • _findProductsAndCalculate
      • _findProductsThenCalculate
      • _getProductAttributeSet
      • _setLastVisited
    • Categories
      • _findCategoryTreeById
      • _findCategoriesByIds
      • _findCategoryByAlias
      • _findCategoryTreeByAlias
      • _getCategoryContent
    • Collections
      • _getCollectionContent
      • _findCollectionsByIds
      • _findCollectionsByIdsThenCalculate
    • Brands
      • _getBrandContent
      • _findBrandsByIds
    • Cart
      • _addToCartMulti
      • _addToCart
      • _setCart
      • _clearCart
      • _setCartListener
      • _removeFromCart
      • _calculateCart
    • Checkout
      • _startCheckout
      • _updateCheckout
      • _completeCheckout
    • Shopping Lists
      • _getShoppingLists
      • _updateShoppingList
      • _createShoppingList
      • _deleteShoppingList
      • _getShoppingListByAlias
    • Navigation
      • _getFooterMenu
      • _getHeaderMenu
    • Users
      • _getUserById
    • Utils
      • _calculateCurrency
      • _getCurrencySymbol
      • _getCulture
      • _subscribeToNewsletter
      • _findUnitsByIds
  • Vs Code
    • Getting Started
  1. Navigation

_getFooterMenu

How to Use _getFooterMenu Method#

The _getFooterMenu method is designed to retrieve the footer menu of the application. Like the header menu method, it optimizes performance by using caching and local storage, minimizing the need for repeated API calls. This method is ideal for loading the footer navigation menu, which is commonly accessed across different pages of the application.

Usage Steps:#

1.
Trigger the Method:
This method does not require any input parameters. You simply call the method to retrieve the footer menu.
2.
Define a Callback Function:
The callback function is passed as a parameter. This function will be executed once the footer menu is retrieved. The retrieved menu data will be passed as an argument to this function.
3.
Handle Retrieved Footer Menu:
Inside your callback function, you can process the retrieved menu data. This might involve displaying the menu in the footer section of your UI or performing other actions based on the menu structure.

Example:#

In this example:
The handleFooterMenu function will be executed once the footer menu is retrieved, allowing you to process and display the menu data as needed.

Common Use Cases:#

1.
Footer Navigation:
Use this method to dynamically load and display the footer navigation menu on your application's pages.
2.
Optimized Menu Loading:
This method is useful for ensuring that the footer menu loads quickly, even when accessed repeatedly, by leveraging caching.
3.
Localized Menus:
If your application supports multiple languages, this method will fetch and cache the appropriate footer menu based on the current language setting.

Notes:#

Caching: The method caches the footer menu in memory (_cache_footer_menu) and in local storage to improve performance. If the cache is available, it will be used instead of making an API call.
Language-Specific Data: The method retrieves the footer menu data based on the current language setting, ensuring that users see the correct version of the menu for their language.
Asynchronous Process: Since the method may involve an API call, the callback function will be executed asynchronously once the data is retrieved.
This method provides an efficient way to manage and retrieve the footer menu for your application, ensuring that it is displayed quickly and correctly across different pages and languages.
Previous
_getShoppingListByAlias
Next
_getHeaderMenu
Built with