Magento Expert Forum - Improve your Magento experience
-
How to Get Current Category in Magento 2
Mainly, to get current category details in Magento 2 means retrieving all the information that is present on the category page for example current category name, current category id and many other category details. Magento 2 with all the rich features includes the registry is for storing data. Therefore, we will initiate by getting the category data from the registry. Follow the below-given steps.
Steps to Get the Current Category in Magento2:
Step 1: Create one block file on our custom extension
add Blockname.php in following path
app\code\Vendor\Extension\Block\Blockname.php
For more Details: https://magecomp.com/blog/how-to-get...ory-magento-2/
View more threads in the same category:
-
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks