Answer the question
In order to leave comments, you need to log in
What is the best way to create controllers for pages, products and categories?
I can not decide how best to create controllers for products and categories. There are pages Home, Products, About us, Contacts and categories for products Men's, Women's, Children's. My version is ControllerPage for the pages Home, About us, Contacts, ControllerProducts for the Products page - all products are displayed on it, ControllerCategory for the categories Men's, Women's, Children's - products of a separate category are displayed, ControllerProduct for a separate product. Tell me how is it right?
Answer the question
In order to leave comments, you need to log in
You get the controller of the 1st method))) In
theory, the controller: ControllerProducts
And inside:
actionAll
actionByCategory
actionItem
.....
PageController - for pages Home, About us, Contacts
ProductController - for products and their categories. It makes no sense to create a separate controller for categories, categories are part of the products themselves.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question