Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

GenericViews - Extend CollectionController




19 October 2011 at 5:25am Community Member, 5 Posts

Hello all,

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 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.