<p>Check out the <a href="https://verbb.io/craft-plugins/events/docs/template-guides/available-variables" rel="nofollow noreferrer">documentation on available variables</a> of the plugin. There's a method on the <code>craft.events</code> variable, <code>craft.events.getEventTypes()</code>, which will return all event types.</p>

CC BY-SA 4.0
2023-12-06T15:55:55.780Z
2023-12-06T15:55:55.780Z
MoritzLost
<p>How to call and print only Event Types (title and handle of event types) of Event Plugin -&gt; <a href="https://verbb.io/craft-plugins/events/features" rel="nofollow noreferrer">https://verbb.io/craft-plugins/events/features</a></p>
<p><strong>Moderator Added from Comments:</strong></p>
<p>I need to filter the events based on event types, I am using radion buttons inside a form to select the event type and than pass that value to URL as param. than i am getting that value to filter the events, as follows :
<code>{% set selectedCategory = craft.app.request.getParam('category') ?? 'all' %} {% paginate craft.events.events.type(selectedCategory).limit(12) as pageInfo, pageEntries %}</code></p>
<p>I need to filter the events based on event types, I am selecting the event type and then pass that value to URL as param. then I am getting that value to filter the events, as follows :</p>
<p><code>{% set selectedCategory = craft.app.request.getParam('category') ?? 'all' %} {% paginate craft.events.events.type(selectedCategory).limit(12) as pageInfo, pageEntries %}</code></p>
<p>I have tried <code>{% set eventTypes = craft.events.getAllTypes() %}</code> Neither the property &quot;getAllTypes&quot; nor one of the methods &quot;getAllTypes()&quot;, .....&quot; exist and have public access in class &quot;verbb\events\variables\EventsVariable&quot;.</p>

CC BY-SA 4.0
2023-12-06T14:41:40.230Z
Voting to close because the question lacks details. Please explain what you're trying to do, what you have tried so far, and in what way it's not working as expected.
MoritzLost
CC BY-SA 4.0
2023-12-06T14:54:22.863Z
I need to filter the events based on event types, I am using radion buttons inside a form to select the event type and than pass that value to URL as param. than i am getting that value to filter the events, as follows : {% set selectedCategory = craft.app.request.getParam('category') ?? 'all' %}

 {% paginate craft.events.events.type(selectedCategory).limit(12) as pageInfo, pageEntries %}
user14621
CC BY-SA 4.0
2023-12-06T15:22:32.853Z
I need to filter the events based on event types, I am selecting the event type and then pass that value to URL as param. then I am getting that value to filter the events, as follows : 
{% set selectedCategory = craft.app.request.getParam('category') ?? 'all' %}

 {% paginate craft.events.events.type(selectedCategory).limit(12) as pageInfo, pageEntries %}

I have tried 
{% set eventTypes = craft.events.getAllTypes() %}

Neither the property "getAllTypes" nor one of the methods "getAllTypes()", ....." exist and have public access in class "verbb\events\variables\EventsVariable".
user14621
CC BY-SA 4.0
2023-12-06T15:44:36.843Z
Please edit your question and add that info, and include the code examples as code blocks. It's very hard to read in the comments.
MoritzLost
CC BY-SA 4.0
2023-12-18T19:41:09.757Z
I've modified the question to include the asker's comments in the question body. Cheers, all!
cherrykoda
<plugins><craft4><events>
How to call and print only Event Types of Event Plugin
# How to call and print only Event Types of Event Plugin

(Asked by: username_0 on 2023-12-06)

How to call and print only Event Types (title and handle of event types) of Event Plugin -> <https://verbb.io/craft-plugins/events/features>

**Moderator Added from Comments:**

I need to filter the events based on event types, I am using radion buttons inside a form to select the event type and than pass that value to URL as param. than i am getting that value to filter the events, as follows :
`{% set selectedCategory = craft.app.request.getParam('category') ?? 'all' %} {% paginate craft.events.events.type(selectedCategory).limit(12) as pageInfo, pageEntries %}`

I need to filter the events based on event types, I am selecting the event type and then pass that value to URL as param. then I am getting that value to filter the events, as follows :

`{% set selectedCategory = craft.app.request.getParam('category') ?? 'all' %} {% paginate craft.events.events.type(selectedCategory).limit(12) as pageInfo, pageEntries %}`

I have tried `{% set eventTypes = craft.events.getAllTypes() %}` Neither the property "getAllTypes" nor one of the methods "getAllTypes()", ....." exist and have public access in class "verbb\events\variables\EventsVariable".

**Tags:** plugins, craft4, events

> **Comments:**
> **username_1**: Voting to close because the question lacks details. Please explain what you're trying to do, what you have tried so far, and in what way it's not working as expected.  
> **username_0**: I need to filter the events based on event types, I am using radion buttons inside a form to select the event type and than pass that value to URL as param. than i am getting that value to filter the events, as follows : {% set selectedCategory = craft.app.request.getParam('category') ?? 'all' %}   {% paginate craft.events.events.type(selectedCategory).limit(12) as pageInfo, pageEntries %}  
> **username_0**: I need to filter the events based on event types, I am selecting the event type and then pass that value to URL as param. then I am getting that value to filter the events, as follows :  {% set selectedCategory = craft.app.request.getParam('category') ?? 'all' %}   {% paginate craft.events.events.type(selectedCategory).limit(12) as pageInfo, pageEntries %}  I have tried  {% set eventTypes = craft.events.getAllTypes() %}  Neither the property "getAllTypes" nor one of the methods "getAllTypes()", ....." exist and have public access in class "verbb\events\variables\EventsVariable".  
> **username_1**: Please edit your question and add that info, and include the code examples as code blocks. It's very hard to read in the comments.  
> **username_2**: I've modified the question to include the asker's comments in the question body. Cheers, all!  

---

## 1 answers

### Answer by username_1 on 2023-12-06. Score: 1

Check out the [documentation on available variables](https://verbb.io/craft-plugins/events/docs/template-guides/available-variables) of the plugin. There's a method on the `craft.events` variable, `craft.events.getEventTypes()`, which will return all event types.


---

