the Forum

Load data every month using Jquery FullCalendar and Expression Engine

Posted on October 13, 2011 by Michael Rosario
Total Posts: 33  |  Join date: 03-12-11

The Jquery FullCalendar allows you to provide 'eventsources' with all the events to a Calendar. However, when you have more than 300+ events, loading the calendar becomes really slow and inefficient. The solution is to load all the events or that month only on load and on click of prev/next. After reviewing and analyzing the FullCalendar plugin, we find out that the Calendar adds the following query string to the end of the source:
/events_feed/?start=1316923200&end=1320552000&_=1318533086181 
These represent the start and end of each month display. On the events_feed template. I have the following PHP (parsed during INPUT) to get these values:
<?php
  $start 
=  $_GET['start']
  
$end =  $_GET['end']
  
$starton date('Y-m-d H:i',$start);
  
$endon date('Y-m-d H:i',$end);
?> 
I then feed these values to the following expression engine parameters:
{exp:channel:entries start_on="<? echo $starton; ?>" stop_before="<? echo $endon; ?>"}...YOUR CODE...{/exp:channel:entries} 

Tags: There are no tags for this entry.

There are no answers yet.  Add yours below.

add your answers here
comments powered by Disqus