So I have decided to go back to the original method I was using, based on tutorial 5, after finding a line of code to help filter out the tracks that aren't relevant to that page - "TrackProductID=$this->ID".
However because you can't check the checkbox which is how a TrackProductID gets assigned until after you have created a new entry they are lost. I therefore need to find a way to either add in an 'OR is NULL' argument to the above line or automatically check the checkbox so that the TrackProductID is assigned by default. And then remove the checkbox so that it can't be accidentally unchecked and lost. Does that make sense?
4 May 2011 at 11:17pm
(Last edited: 4 May 2011 11:18pm),
Reading all this I was just wondering whether you were ever going to use the same cdtrack for different cdvolumes? Since you are using a one-to-many relationship I suppose not, in which case you could just use a ComplexTableField instead of the HasManyComplexTableField (or even the DataObjectManager) that will let you create CDTracks for each CDVolume individually and then automatically add the correct page ID to the track, meaning you could even just use <% control CDTracks %> in your template?
You probably wouldn't need ModelAdmin... But maybe I just completely missed the point, in which case just forget I posted :-)
I do think that security is very easy for cms menu items, harder for page items. So if I wanted to have someone only have access to maintain CD data - it takes 2 seconds. Plus ModelAdmin scaffolds the entire data object, no need to create extra code (while silverSmith isn't available ;) ).