eventsCalendar2
Last updated Apr 6th, 2019 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$301 per month—let's make that $500!
Learn moreUsage¶
Simply displays a calendar with events that are childrens of the current resource.
[[!eventsCalendar2]]
Display events from resources 5 and 11. Search for date in TV "date_of_event".
[[!eventsCalendar2
&parents=`4,11`
&dateSource=`date_of_event`
]]
Display custom events, independent from resources.
[[!eventsCalendar2
&events=`[{"id": "1","date": "2012-01-01 00:00:00","pagetitle": "Test page"},{"id": "2","date": "2012-01-02 12:05:00","pagetitle": "Test page 2"}]`
]]
Snippet always must be called uncached.
Available Properties¶
Name | Description | Default Value |
---|---|---|
parents | The ids of an comm-separated list of existing containers. | ?urrent resource |
events | An json-array of events. Overrides all settings. Allows you to display random events from any source. Required date parameter in an array of events to date in the format "Ymd H:i:s". | none |
month | A month to display events. | date('m') |
year | A year to display events. | date('Y') |
dateSource | Field for search the events date. It can be a TV. | createdon |
dateFormat | Date format. Used strftime(). | %d %b %Y %H:%M |
hideContainers | Hide containers? | 0 |
showHidden | Show hidden in menu resources? | 1 |
includeContent | Include content field? Disabling may increase perfomance. | 1 |
includeTVs | Include template variables? | 0 |
includeTVList | List of comma-separated template variables for including. | none |
processTVs | Process template variables according to its type? | 0 |
processTVList | List of comma-separated template variables for processing of events. | none |
tplMain | Name of existing chunk for templating calendar container. | tplCalendar2 |
tplEvent | Name of existing chunk for template events. | tplEvent2 |
tplHead | Name of existing chunk for template events. | tplHead2 |
tplCell | Name of existing chunk for template events. | tplCell2 |
theme | CSS theme for calendar. File must be in /core/assets/components/eventscalendar2/css/%themename%/theme.css. | |
For example theme bootstrap, included in package is in /core/assets/components/eventscalendar2/css/bootstrap/theme.css | default | |
regCss | Load built-in CSS (or theme) for calendar? | 1 |
regJs | Load built-in javascript for calendar? | 1 |
plPrefix | Placeholders prefix. | ec. |
calendar_id | Unique id of calendar table on page. | Calendar |
class_calendar | CSS classname for calendar table. | calendar |
class_dow | CSS classname for day of week. | dow |
class_month | CSS classname for month and year. | month |
class_workday | CSS classname for workday. | workday |
class_weekend | CSS classname for weekend. | weekend |
class_today | CSS classname for today. | today |
class_event | CSS classname for div container with event. | event |
class_isevent | CSS classname for cell with event. | isevent |
class_noevent | CSS classname for cell with no event. | noevent |
class_date | CSS classname for date of event. | date |
class_emptyday | CSS classname for empty day, with no date. | emptyday |
class_prev | CSS classname for previous month button. | prev |
class_next | CSS classname for next month button. | next |
btn_prev | Text for the button of previuos month. | « |
btn_next | Text for the button of next month. | » |
show_errors | Show calendar errors on the webpage. | 1 |
first_day | 0 - first day of week is a sunday. 1 - first day of week is a monday. | 1 |
time_shift | Time shift from the server in seconds. Maybe positive or negative. | 0 |
Source code¶
Here is this snippet on Github.
See Also¶
- eventsCalendar2.eventsCalendar2
- eventsCalendar2.Generating events
- eventsCalendar2.tplCalendar2
- eventsCalendar2.tplCell2
- eventsCalendar2.tplEvent2
- eventsCalendar2.tplHead2
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$301 per month—let's make that $500!
Learn more