This maybe a dumb question - I am still learning SilverStripe in general....
I am building a Song Library module for a client. My classes are:
Songs - Title, Lyrics, Author
Theme - Title
SubTheme - Title.
Songs have many SubThemes. SubThemes have one Theme.
I am using ModelAdmin and ManyManyDataObjectManager to provide a CMS interface for the library. MMDOM is used on the Songs CMS page to allow the user to select the SubThemes for the song. This is working great, but I am stuck with two things:
1. I want the MMDOM to display ALL the SubThemes not just the first 10 by default.
2. I want to include a column with the Theme for each SubTheme.
My current code for the cms is
function getCMSFields() {
$f = parent::getCMSFields();
$manager = new ManyManyDataObjectManager(
$this, // Controller
'SubThemes', // Source name
'SubTheme', // Source class
array('Title'=>'Title'),
'getCMSFields_forPopup' );
$f->removeFieldFromTab('Root', 'SubThemes'); // replace the tab with MMDOM tab
$f->addFieldToTab('Root.Theme', $manager);
return $f; }
I can post my classes too if that helps. Any advice much appreciated.