Im having a lot of products and I've made them DataObjects to avoid the SiteTree being filled up with items/products.
Currently I have a Category_Controller which handles category view and product view via two routes.
When rendering a product I would like to be able to use another page as the "rendering template". On this page I need a specific widget area that should not be shown on the category page. But since its the same controller that handles both category view and product view I can't seem to find a good solution to this.
Any help is appreciated.
1. Maybe I could do with 2 widget areas? But is that possible?
2. Also trying to set a page type on the Category object from the Category_Controller (product or category depending on wich method is fired via the routes). But it doesnt seem to be the same object I get when fetching Director::currentPage();
Please let me know if you need further explaination as I know this all might sound a bit tricky!
Both ProductCategory_Page and Product_Page are dynamic urls - but since Im using "DataObjects as pages" from ssbits.com I don't have a page for my Product in the sitetree. I only have a page for the ProductCategory. And since product category is dynamic (DataObject) I can't write a route for it (or at least I don't know that I can...).
Would it be possible to tell the ShowProduct action on ProductCategory_Controller to grab another Page and use that for the rendering?
Of course this would require getting two pages - But could it work?