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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

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

Using ComplexTableField or DOM or ModelAdmin to manage large lists of children

Go to End



Community Member, 22 Posts

12 April 2013 at 3:46pm

Hi, I have a calendar (Event Calendar module, Silverstripe 2.4) with an awful lot of events in it. They are a pain to manage, but we need to keep the old ones for reference.
I searched the web for ways to organise this sort of thing and came across a developer discussion that said nested folders were a desirable thing for organising pages, but at present you could use ComplexTableField for sorting and finding etc. Great, I thought.
Tried to do it. Nothing appeared, obviously not finding relationships. Changed to DataObjectManager, same thing. Changed to HasManyDataobjectManager, and success! There are all my calendar events, and I can edit them and sort them.
BUT the searchbox doesn't work, and that's the most important thing. Little wheel spins, but when it stops the whole list is still there. Another issue, although minor, is that when you create a new event it gets created at the top level of the site tree and thus appears in the navigation menus, but I just removed the "add" function to fix that.
Did some more Googling, and decided to try to use ModelAdmin for the same thing.In some ways this is an improvement, as I can search just fine. However creation of new events still puts them at the top level and I can't figure out how to disable the "add" button in M<odelAdmin.

So, if anyone can tell me either a) how to make the search function in the DOM work for pages, b) how to disable the "add" button in Model Admin, c) how to force new pages to be added under a specific parent, or d) another way to manage large numbers of child pages, I would be very grateful.