DocCalendar Snippet
Evolution Documents Calendar snippet based on Doclister
Required Extras: DocLister
DocCalendar is a simple and versatile Calendar snippet for displaying events calendar based on DocLister.
DocCalendar is based on FullCalendar 3.x, a cool opensource javascript event calendar https://fullcalendar.io/
DocCalendar Parameters
You can customize your calendar using a big set of parameters included in DocCalendar
Snippet Parameters
- calID : 'DocCalendar'; unique id of your calendar (required for multiple calendars in one page)
- tpl: 'DocCalendar-Tpl; chunk template
- Modal : '0'; Enable Modal (only Bootstrap modal for now, jquery modal will be added in next version)
- ModalTpl: ModalTpl ; modal chunk template
- jQuery: '1' ; load jquery js in your template
- LoadAssets : '1'; load FullCalendar js in your template - with multiple DocCalendar calls on the same page, you need load FullCalendar (and jquery) package just one time.
FullCalendar parameters
(more infos and doc at fullcalendar.io/docs/)
- locale : 'eng'; your calendar language
- views : 'agendaDay,agendaWeek,month'; available views: agendaDay,listDay,agendaWeek,listWeek,month
- defaultView : 'month';
- headerButtons : 'prev,next'; available buttons: prev,next today
- listDaytext : 'list Day'; translation for listdays button
- listWeektext: 'list Week'; translation for listWeektext button
- dow : '1, 2, 3, 4, 5, 6, 7'; // days of week. an array of zero-based day of week integers (0=Sunday)
- startTime : '08:00'; // a start time (10am in this example)
- endTime : '21:30';// an end time (6pm in this example)
- minTime : '08:00:00';
- maxTime : '22:30:00';
- navLinks : 'false';
- eventLimit : 'true';
- editable : 'false';
Available DocLister parameters:
- parents
- display
- tvList
- tvPrefix
- summary
- dateFormat
- depth
- debug
- filters
- tpl
- total
- showParent
- showNoPublish
- addWhereList
...and more
Chunks and tvs included in the package
- BlogCalendar: calendar tpl (with createdon/publishedon as source date) to create blog archives calendars
- EventCalendar: calendar tpl (with tvs as source date) to create events calendars
- Event-Start-Date: Start date tv for events calendars
- Event-End-Date: End date tv for events calendars
Using different Date source
If you want to use editedon instead createdon date, just open DocCalendar-Tpl and replace
start: '[+date+]
',
with
start: '[+editedon+]
',
Using tvs for Date source
For Events Calendars like courses, events, bookings.. you can set both start date and end date of any event:
Check the included EventCalendar chunk template for a more detailed example
Important: set date-format for both tvs to Y-m-d\TH:i:s\Z
in your Calendar tpl:
start: '[+Start-Date+]
',
end: '[+End-Date+]
'
Usage
Basic call
[[DocCalendar]]
Advanced call with language (locale)
[[DocCalendar? &parents=`121,102,122` &tpl=`BlogCalendar-Tpl` &locale=`it`]]
Advanced call with Bootstrap Modal
[!DocCalendar? &calID=`demo2` &parents=`121,122` &tpl=`BlogCalendar-Tpl` &Modal=`1` &ModalTpl=`Modal-DocCalendar` &jQuery=`0`]]
Advanced call with filters, language, tvs for Date source
[[DocCalendar? &calID=`events` &parents=`159` &filters=`AND(tv:InCalendar:is:yes)` &tpl=`EventCalendar-Tpl` &tvPrefix=`` &tvList=`Event-Start-Date,Event-End-Date` &renderTV=`Event-Start-Date,Event-End-Date` &jQuery=`0`]]
Demo
[!DocCalendar? &calID=`demo` &parents=`121,122` &tpl=`BlogCalendar-Tpl` &Modal=`0` &jQuery=`0`]]