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:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Restricting visibility of database items

Go to End

19 Posts   2835 Views


Forum Moderator, 1391 Posts

5 May 2011 at 12:23am

Edited: 05/05/2011 12:45am

Sure and absolutely and yep :-)

In this case though, I assumed that maybe restricting dataobjects referred to the HasManyComplexTableField summary indeed showing each and every existing track, no matter what volume-page you're on, and I thought the idea was to only show the tracks linked to the current volume, which the ComplexTableField does... But, as said, I could easily be thinking in the wrong direction :-)

[EDIT] Oh, ok, didn't see the last post coming - importing csv does point to ModelAdmin :-)

(Sometimes I even implement ComplexTableField and ModelAdmin simultaneously, when a user finds he's more comfortable doing everything Page by Page)


Community Member, 65 Posts

5 May 2011 at 12:38am

No that is right. I am sure any confusion would have come from my side as I am still getting to grips with SS. I have changed the table to ComplexTableField rather than HasManyComplexTableField and, given the requirements for this project, will probably strip out the ModelAdmin. Although it has been very useful exploring this as I am sure I will need it in the future.

The only thing I am left now if to split up the volumes into multiple sections.

return DataObject::get('Track', "TrackProductID=$this->ID AND TrackExercise='Barre'" );

Got it working, next step is how to replace Barre, so that it is not hard coded as this will vary by volume, with a reference to a field stored in the ProductPage table...


Community Member, 65 Posts

5 May 2011 at 1:04am

That was easier that I thought.

return DataObject::get('Track', "TrackProductID=$this->ID AND TrackExercise='$this->TrackListingTab1'" );

Go to Top