10385 Posts in 2197 Topics by 1712 members
|Go to End|
19 October 2011 at 5:25am
I'm using GenericViews for basic CRUD on two datatypes - Book and Chapter. What I want to have are custom functions for the various actions on each datatype e.g. add, edit, view etc.
I can handle the display part of it by creating .ss files such as Book_view.ss and so on. That bit works fine. What I can't seem to do is override CollectionController.
Initially tried adding a controller class in Chapter.php but that is extending Dataobject and doesn't seem to do anything. Also tried creating a separate file called ChapterController and trying from there but that also doesn't seem to be working.
I think I could probably distinguish between the datatypes I want in the add() and addForm() functions in CollectionController itself but that doesn't seem like the smart way to do it at all.
Anyone else had a similar problem or have any advice?
Any help very much appreciated.
|Go to Top|