Jump to:

23360 Posts in 18124 Topics by 2862 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: 163 Views
  • khanhdeux
    Avatar
    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
    Avatar
    Forum Moderator
    5483 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.

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