I've been following http://www.ssbits.com/tutorials/2010/dataobjects-as-pages-part-2-using-model-admin-and-url-segments-to-create-a-product-catalogue/ tutorial on my localhost and running into a sidebar problem.
When I use the same method to create a sidebar as tutorial one, an error message shows on my site: [User Error] Uncaught Exception: Object->__call(): the method 'categorypages' does not exist on 'Product'
I know someone had this problem before, but the solution in the discussion didn't solve my problem since I am using the new code ($Category = $this->Categories()->First(); on line 120).
This is the code I added to Product.php for sidebar to appear.
//Return the Title as a menu title
public function MenuTitle()
//Ensure that the DO shows up in menu (it is needed otherwise sidebar doesn't show when not logged in)
Does anyone know how to fix it? Thanks very much.