I have a dataobject called workshop. Each workshop has an active group. I need to find out if the current member is in the active group. I can do this in the template where all the workshops loop and I check to see if the current member is in the active group:
<% loop $Workshops %>
<% if $CurrentMember.inGroup($ActiveGroupID) %>
<% end_if %>
<% end_loop %>
While this works for a handful of workshops, it's not really ideal for lots. How do I achieve the same thing by only calling the workshops I need rather than calling them all to check? Some sort of filter on Workshops::get()? Help!
Thanks in advance.