Log in
Helper

Category

Magento\Catalog\Helper\Category

What it does

This helper class provides utility methods for working with Magento 2 categories.

Developers use it to retrieve store categories, generate category URLs, check if categories can be displayed, and manage canonical tags for SEO purposes.

It's commonly used in frontend templates and blocks when rendering category navigation or validating category visibility.

Public Methods

  • getStoreCategories()
  • getCategoryUrl()
  • canShow()
  • canUseCanonicalTag()
  • _resetState()
  • getCanonicalUrl()