ez.no / exponential / documentation / reference / template operators / miscellaneous / month_overview
$month_list|month_overview( field,
today_timestamp,
hash( 'current', current_timestamp,
'day_class', day_class
'current_class', current_class,
'link', link,
'month_link', month_link,
'year_link', year_link,
'day_link', day_link,
'next', hash( 'link', next_link ),
'previous', hash( 'link', previous_link ) ) )
| Name | Type | Description | Required |
|---|---|---|---|
| field | string | object's field to be used in order to group objects by date ('published' may be used, but class fields are not reachable!) | yes |
| today_timestamp | timestamp | timestamp of the day being searced for objects | yes |
| current_timestamp | timestamp | timestamp of the current date (in order to highlighted it in the calendar) | no |
| day_class | string | stylesheet's class to be used for a 'normal' day | no |
| current_class | string | stylesheet's class to be used for the current day | no |
| link | string | link for days containing objects (content/view/full/NODE, or s omething like that, usually) | no |
| month_link | string | whether to append or not the /month/MON string to links | no |
| year_link | string | whether to append or not the /year/YEAR string to links | no |
| day_link | string | whether to append or not the /day/DAY string to links | no |
| next_link | string | next month's link | no |
| previous_link | string | previous month's link | no |
a complex structure (see below) that is used by the monthview.tpl navigator template to visually build the calendar
This operator gets a list of content objects as input and analyze them in order to know how they distribute within a given month. The resulting structure is used by the monthview.tpl template (see design/standard/templates/navigator/monthview.tpl) to highlight those days when at least one object has been published.
As of version 3.3.3, the operator seems only to support the 'published' field, it doesn't support object's data_map attributes.
The structure returned is sketched below:
. |-- year |-- month |-- weekdays[] | |-- day | |-- class | |-- weeks[][] | |--day | |--link | |--class | |--highlight | |-- next | |--month | |--link | |-- previous |--month |--link
Example 1
month=$month_list|month_overview( 'published', maketime( 0, 0, 0, $today_info.month, $today_info.day, $today_info.year ), hash( current, maketime( 0, 0, 0, $today_info.month, $today_info.day, $today_info.year ), current_class, 'selected', link, concat( "content/view/full/", $log_node_id ), month_link, true(), year_link, true(), day_link, true(), next, hash( link, concat( "content/view/full/", $log_node_id ) ), previous, hash( link, concat( "content/view/full/", $log_node_id ) ) ) ) } {include uri="design:navigator/monthview.tpl"}
Log in or create a user account to comment.
Comments