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.

General Questions

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

Tags LIKE in SS3


Reply

3 Posts   329 Views

Avatar
socks

21 October 2012 at 10:42am Community Member, 190 Posts

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

How do I translate that into SS3?

Thanks

Avatar
simon_w

21 October 2012 at 12:48pm Forum Moderator, 474 Posts

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

See the [url=http://doc.silverstripe.org/framework/en/topics/datamodel]datamodel[/url] docs for more information.

Avatar
socks

21 October 2012 at 2:09pm Community Member, 190 Posts

Works great. Thank You!