Filter events by owner fields - Calendar plugin I'm using Michael Rog's Craft Calendars plugin.

I'm wondering if it's possible to limit events to specified owner category.

For example, I have a training entry with trainingType and trainingLevel category type fields.

While listing events is it possible to do something like:

{% set params = {
    calendar: 'myAwesomeCalendar',
    dateRangeStart: 'today',
    dateRangeEnd: now|date_modify("+1 month"),
    owner.trainingType = 'webinar',
    owner.trainingLevel = 'expert' 
} %}

{% for e in craft.calendars.events(params) %}
    &lt;h1&gt;{{ e.owner.title }}&lt;/h1&gt;
    &lt;p&gt;Starts: {{ e.startDate  | date("Y-m-d") }}&lt;/p&gt;
    &lt;p&gt;{{ e.owner.trainingType }} , {{ e.owner.trainingLevel }}
{% endfor %}


If not, how else would you approach this.
You can find info about how to do this in the docs: https://calendars.docs.topshelfcraft.com/guide/events-variable.html#How-it-Works

The EventCriteriaModel given by craft.calendars.events is used to query the owner elements from which the event instances are generated.

So, in your example above, you can use something like:

{% set params = {
    calendar: 'myAwesomeCalendar',
    dateRangeStart: 'today',
    dateRangeEnd: now|date_modify("+1 month"),
    trainingType: 'webinar',
    trainingLevel: 'expert' 
} %}


This tells Calendars:


Find entries where trainingType is "webinar" and trainingLevel is "expert"...
...and if those elements have any event rules registered on the Calendar called myAwesomeCalendar...
...return the instances of those events that occur in the next month.


(In this case, Calendars queries Entry elements, since that is the default. You could specify a different element type, however.)