From 1b6f692d9715199d4dafe9b923d030978285d3a9 Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 17 Feb 2014 12:55:16 -0600 Subject: documentation for calendar updates change log and user guide updates for calendar update --- user_guide_src/source/libraries/calendar.rst | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'user_guide_src/source/libraries/calendar.rst') diff --git a/user_guide_src/source/libraries/calendar.rst b/user_guide_src/source/libraries/calendar.rst index 2263aa404..792f1d504 100644 --- a/user_guide_src/source/libraries/calendar.rst +++ b/user_guide_src/source/libraries/calendar.rst @@ -100,7 +100,7 @@ preferences below. ====================== ================= ============================================ =================================================================== Preference Default Options Description ====================== ================= ============================================ =================================================================== -**template** None None A string containing your calendar template. +**template** None None A string or array containing your calendar template. See the template section below. **local_time** time() None A Unix timestamp corresponding to the current time. **start_day** sunday Any week day (sunday, monday, tuesday, etc.) Sets the day of the week the calendar should start on. @@ -147,7 +147,7 @@ Creating a Calendar Template ============================ By creating a calendar template you have 100% control over the design of -your calendar. Each component of your calendar will be placed within a +your calendar. Using the string method, each component of your calendar will be placed within a pair of pseudo-variables as shown here:: $prefs['template'] = ' @@ -193,6 +193,18 @@ pair of pseudo-variables as shown here:: echo $this->calendar->generate(); +Using the array method, you will pass `key => value` pairs. You can pass as many or as few values as you'd like. Omitted keys will use the default values inherit in the calendar class. + + $prefs['template'] = array( + 'table_open' => '', + 'cal_cell_start' => '
', + 'cal_cell_start_today' => '', + ); + + $this->load->library('calendar', $prefs); + + echo $this->calendar->generate(); + *************** Class Reference *************** -- cgit v1.2.3-24-g4f1b