I want to show the category-listing on a custom module-page.
For example: [url]/brandstore/index/listing/brand/1/category/10

I tried to copy the content of the catalog_category_view.xml to my custom brandstore_index_listing.xml but i get an exception because the current_category is not defined in the registry.

Any suggestion for this issue?

  • Your brandstore module has its own block, controller, model? – Khoa TruongDinh Sep 12 '16 at 16:01
  • Yes, it is a custom module with blocks, controllers and models – Cenzo Sep 13 '16 at 6:58

Ok, I think I got a solution.

In my custom Block, I extend the Core Block


And in the construct before calling the parent construct I set the current_category to my custom category.

If someone needs more details, let me know.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.