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   376 Views

Avatar
socks

Community Member, 190 Posts

21 October 2012 at 10:42am

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

How do I translate that into SS3?

Thanks

Avatar
simon_w

Forum Moderator, 474 Posts

21 October 2012 at 12:48pm

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

Community Member, 190 Posts

21 October 2012 at 2:09pm

Works great. Thank You!