ex: I have category list as follows:
Men
–top
—shoes
–bottom
I have current_category is shoes. so how to add class to this and all parent of this.
categorymagento2menu
ex: I have category list as follows:
Men
–top
—shoes
–bottom
I have current_category is shoes. so how to add class to this and all parent of this.
Best Answer
Using below code you can get parents of current category