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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   3056 Views

Avatar
martimiz

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)

Avatar
marc79

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

Avatar
marc79

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