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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Tags LIKE in SS3


Go to End


3 Posts   602 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!