month_overview

Summary

gets an array of fetched content objects as input and returns a structure, suited to be used in the navigator/monthview.tpl template, to build a calendar object.

Usage

$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 )  ) )

Parameters

NameTypeDescriptionRequired
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

Returns

a complex structure (see below) that is used by the monthview.tpl navigator template to visually build the calendar

Description

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

Examples

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"}

Comments

Log in or create a user account to comment.

Contents

Reference

Database diagram
Template operators
    PDF
    Arrays
    Data extraction
    Formatting
    Images
    Logic
    Mathematics
    Miscellaneous
       month_overview
       attribute
       treemenu
    Strings
    URLs
    Variables
Template functions
Data fetching
Modules
XML tags


Created

04/05/2004
2:18:34 pm
by Guglielmo Celata

Last updated

04/05/2004
6:25:00 pm
by Guglielmo Celata

Authors

Guglielmo Celata



This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.