<p>The events plugin by Pixel &amp; Tonic is an example of how to use custom Elements if you're building your own plugin. I don't think it should be used in a production environment (but please correct me if I'm wrong). </p>

<p>If you want to use it, you should take a look at <a href="https://github.com/pixelandtonic/Events/blob/master/events/variables/EventsVariable.php" rel="nofollow">the only variable</a> for this plugin.
This variable gives you the ability to get all events, filtered by your criteria. There's no way to get all calendars, only events:</p>

<pre><code>{% for event in craft.events.events %}

{% endfor %}
</code></pre>

<p>One other plugin you could have a look at, is <a href="http://michaelrog.com/craftcalendars/" rel="nofollow">this one</a>, still in private beta.</p>

CC BY-SA 3.0
2014-10-06T13:47:59.747Z
Awesome Paul! Thanks for the answer. I'm not seeing where the second (or first) craft.events.events is coming from there. Am I just missing something?
Spentacular
CC BY-SA 3.0
2014-10-06T14:46:26.703Z
The first events is the plugin handle, the second is the events variable that provides a way to interact with the plugin's events from a template.
Paul
CC BY-SA 3.0
2014-10-06T23:47:07.787Z
When I get some more rep, I'll come back and up vote these. Thanks so much for the help!
Spentacular
CC BY-SA 3.0
2014-10-06T09:02:43.640Z
2014-10-06T09:02:43.640Z
Paul
<p>I'm having trouble using the <a href="https://github.com/pixelandtonic/Events" rel="nofollow">Pixel and Tonic's Events plugin</a>. I actually have no clue where to start on how to get it to render events in a template. I'm currently trying to pass in:</p>

<pre><code>{% for event in craft.events.events_calendars('calendarName') %}
</code></pre>

<p>Which is obviously wrong. Could anyone explain how I understand what methods and variables those methods take for custom Element types?</p>

CC BY-SA 3.0
2014-10-06T19:47:12.040Z
Important to note (as mentioned in [Paul's answer](http://craftcms.stackexchange.com/a/2941/45)), the P&T Events plugin is **strictly an example plugin**. It was built as a demonstration of how to create custom Element Types... the plugin was never intended to be used as-is.
Lindsey D
CC BY-SA 3.0
2014-10-07T01:20:46.680Z
But if you need events... http://michaelrog.com/craftcalendars
Michael Rog
<templating>
Trouble using events plugin
# Trouble using events plugin

(Asked by: username_0 on 2014-10-06)

I'm having trouble using the Pixel and Tonic's Events plugin. I actually have no clue where to start on how to get it to render events in a template. I'm currently trying to pass in:
{% for event in craft.events.events_calendars('calendarName') %}

Which is obviously wrong. Could anyone explain how I understand what methods and variables those methods take for custom Element types?

**Tags:** templating
> **Comments:**
> **username_1**: Important to note (as mentioned in [Paul's answer](http://craftcms.stackexchange.com/a/2941/45)), the P&T Events plugin is **strictly an example plugin**. It was built as a demonstration of how to create custom Element Types... the plugin was never intended to be used as-is.  
> **username_2**: But if you need events... http://michaelrog.com/craftcalendars  

---

## 1 answers

### Answer by username_3 on 2014-10-06. Score: 2 | Accepted answer

The events plugin by Pixel & Tonic is an example of how to use custom Elements if you're building your own plugin. I don't think it should be used in a production environment (but please correct me if I'm wrong). 
If you want to use it, you should take a look at the only variable for this plugin.
This variable gives you the ability to get all events, filtered by your criteria. There's no way to get all calendars, only events:
{% for event in craft.events.events %}

{% endfor %}

One other plugin you could have a look at, is this one, still in private beta.

> **Comments:**
> **username_0**: Awesome Paul! Thanks for the answer. I'm not seeing where the second (or first) craft.events.events is coming from there. Am I just missing something?  
> **username_3**: The first events is the plugin handle, the second is the events variable that provides a way to interact with the plugin's events from a template.  
> **username_0**: When I get some more rep, I'll come back and up vote these. Thanks so much for the help!  

---

