Jump to:

23375 Posts in 18175 Topics by 2866 members

General Questions

SilverStripe Forums » General Questions » Tags LIKE in SS3

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: 310 Views
  • socks
    Avatar
    Community Member
    190 Posts

    Tags LIKE in SS3 Link to this post

    return DataObject::get('BlogEntry',"Tags LIKE '%testimonial%'", "", "", "1");

    How do I translate that into SS3?

    Thanks

  • simon_w
    Avatar
    Forum Moderator
    471 Posts

    Re: Tags LIKE in SS3 Link to this post

    BlogEntry::get()->filter('Tags:PartialMatch', 'testimonial');

    See the datamodel docs for more information.

  • socks
    Avatar
    Community Member
    190 Posts

    Re: Tags LIKE in SS3 Link to this post

    Works great. Thank You!

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