Jump to:

23550 Posts in 19336 Topics by 2890 members

General Questions

SilverStripe Forums » General Questions » Module filter at backend

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
Go to End
Author Topic: 262 Views
  • khanhdeux
    Community Member
    13 Posts

    Module filter at backend Link to this post

    Hi Silverstripe team

    I have a module called Video, but at the backend i wanna display list of video which belong to the current user and modify the search function with only videos the that user uploaded? really appreciate any help? Thanks

  • Willr
    Forum Moderator
    5511 Posts

    Re: Module filter at backend Link to this post

    You should post some more details about your situation. If you have a has_one relation between video and users (where Video has one 'User' you can get a users videos by using

    Video::get()->filter('UserID', Member::currentUserID());

    The search query would need to filter by that same 'UserID' field on your Video model.

Page: 1
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.