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

Tags LIKE in SS3


Go to End
Reply


3 Posts   412 Views

Avatar
socks

Community Member, 191 Posts

21 October 2012 at 10:42am

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

How do I translate that into SS3?

Thanks

Avatar
(deleted)

Community Member, 473 Posts

21 October 2012 at 12:48pm

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

See the datamodel docs for more information.

Avatar
socks

Community Member, 191 Posts

21 October 2012 at 2:09pm

Works great. Thank You!