Jump to:

10994 Posts in 2728 Topics by 1819 members

All other Modules

SilverStripe Forums » All other Modules » GenericViews - Extend CollectionController

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 436 Views
  • midoriberlin
    Community Member
    5 Posts

    GenericViews - Extend CollectionController Link to this post

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



Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.