Create a monthly mini view


.


Create a monthly mini view like this

September
Mo Tu We Th Fr Sa Su
35 30 31 1 2 3 4 5
36 6 7 8 9 10 11 12
37 13 14 15 16 17 18 19
38 20 21 22 23 24 25 26
39 27 28 29 30 1 2 3
 

Tutorial

1st Step:

Create a file e.g. "monthminiview.tmpl" somewhere in your fileadmin directory e.g. fileadmin/templates/cal/

-> fileadmin/templates/cal/monthminiview.tmpl

 

2nd Step:

Insert data into the file:

-> ###MONTH_SMALL|+0###

Note: "MONTH_SMALL" reflects the template "+0" the monthly offset from today. Have a look at the sidebar.tmpl at your cal installation (static/template/sidebar.tmpl) and search for "MONTH_SMALL". You will find 3 marker with -1 (last month), +0 (this month) and +1 (next month)

Save the file.

 

3rd Step:

Modify your template or create an extended template for cal.

You have to assign the new template to a view and set this view as default view

plugin.tx_cal_controller.view.month.monthTemplate = monthminiview.tmpl
plugin.tx_cal_controller.view.allowedViews = month
plugin.tx_cal_controller.view.day.dayViewPid = //insert pid where to display the events for a day (else they won't get displayed at all)
plugin.tx_cal_controller.pidList = //insert a comma separated list of pids containing your events here

 

4th Step:

Insert the calendar plugin as content element on your page

 

That's it. Have a look at you page :)

 

// PS: since cal 0.16.0 this option has been included in the flexform. Have a look at month view -> Display as a mini calendar

 

-top-