Jump to:

23581 Posts in 19403 Topics by 2893 members

General Questions

SilverStripe Forums » General Questions » Restricting visibility of database items

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

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

Page: 1 2 3
Go to End
Author Topic: 1920 Views
  • martimiz
    Avatar
    Forum Moderator
    1091 Posts

    Re: Restricting visibility of database items Link to this post

    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)

  • marc79
    Avatar
    Community Member
    65 Posts

    Re: Restricting visibility of database items Link to this post

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

  • marc79
    Avatar
    Community Member
    65 Posts

    Re: Restricting visibility of database items Link to this post

    That was easier that I thought.

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

    1920 Views
Page: 1 2 3
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.