<p>There's a definitely a syntax error in your first line.</p>

<pre><code>({
    loadOccurrences: false
})
</code></pre>

<p>should be:</p>

<pre><code>{
    loadOccurrences: false
}
</code></pre>

<p>Also, from their docs, the <a href="https://solspace.com/craft/calendar/docs/calendar.export/" rel="nofollow noreferrer"><code>export</code></a> method only shows one parameter being passed in and you've specified two.</p>

CC BY-SA 3.0
2017-08-28T21:44:01.657Z
2017-08-28T21:44:01.657Z
Brad Bell
<p>I'm trying to add an export function to my calendar that will export a single event.</p>

<p>When I use the example code, it exports my entire calendar.</p>

<p>I tried passing a single event using this code:</p>

<pre><code>{% set events = craft.calendar.event(craft.request.getSegment(3), ({
    loadOccurrences: false 
})) %}

{{ craft.calendar.export(events) }}
</code></pre>

<p>and I get this error:</p>

<blockquote>
  <p>Argument 1 passed to Calendar\Library\Export\AbstractExportCalendar::__construct() must be an instance of Calendar\Library\Events\EventList, instance of Calendar\Library\Events\Event given, called in /craft/plugins/calendar/variables/CalendarVariable.php on line 128 and defined</p>
</blockquote>

<p>Is there a way to export only individual events?</p>

<solspace><plugin-solspacecalendar>
Solspace Calendar: Export a single event
# Solspace Calendar: Export a single event

(Asked by: username_0 on 2017-08-28)

I'm trying to add an export function to my calendar that will export a single event.
When I use the example code, it exports my entire calendar.
I tried passing a single event using this code:
{% set events = craft.calendar.event(craft.request.getSegment(3), ({
    loadOccurrences: false 
})) %}

{{ craft.calendar.export(events) }}

and I get this error:

Argument 1 passed to Calendar\Library\Export\AbstractExportCalendar::__construct() must be an instance of Calendar\Library\Events\EventList, instance of Calendar\Library\Events\Event given, called in /craft/plugins/calendar/variables/CalendarVariable.php on line 128 and defined

Is there a way to export only individual events?

**Tags:** solspace, plugin-solspacecalendar


---

## 1 answers

### Answer by username_1 on 2017-08-28. Score: 1

There's a definitely a syntax error in your first line.
({
    loadOccurrences: false
})

should be:
{
    loadOccurrences: false
}

Also, from their docs, the export method only shows one parameter being passed in and you've specified two.


---

