Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-06T13:47:59.747Z
Answers.Text: 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?
Answers.UserDisplayName: Spentacular
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-06T14:46:26.703Z
Answers.Text: 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.
Answers.UserDisplayName: Paul
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-06T23:47:07.787Z
Answers.Text: When I get some more rep, I'll come back and up vote these. Thanks so much for the help!
Answers.UserDisplayName: Spentacular
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-10-06T09:02:43.640Z
Answers.LastActivityDate: 2014-10-06T09:02:43.640Z
Answers.UserDisplayName: Paul
Body: <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>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-10-06T19:47:12.040Z
Comments.Text: 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.
Comments.UserDisplayName: Lindsey D
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-10-07T01:20:46.680Z
Comments.Text: But if you need events... http://michaelrog.com/craftcalendars
Comments.UserDisplayName: Michael Rog
Tags: <templating>
Title: Trouble using events plugin
ThreadText: # Trouble using events plugin
  
  (Asked by: username_0 on 2014-10-06)
  
  I'm having trouble using the [Pixel and Tonic's Events plugin](https://github.com/pixelandtonic/Events). 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 [username_3'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://username_2.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](https://github.com/pixelandtonic/Events/blob/master/events/variables/EventsVariable.php) 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](http://username_2.com/craftcalendars/), still in private beta.
  
  > **Comments:**
  > **username_0**: Awesome username_3! 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!  
  
  ---
  
  