diff options
author | Andrew <browner12@gmail.com> | 2014-02-17 19:55:16 +0100 |
---|---|---|
committer | Andrew <browner12@gmail.com> | 2014-02-17 19:55:16 +0100 |
commit | 1b6f692d9715199d4dafe9b923d030978285d3a9 (patch) | |
tree | ee3cd46c08708981900d3b91431f0a690ac7a3ff /user_guide_src/source/libraries/calendar.rst | |
parent | 63cb46b94c4dda33e036643fbca3d94e0ba079f0 (diff) |
documentation for calendar updates
change log and user guide updates for calendar update
Diffstat (limited to 'user_guide_src/source/libraries/calendar.rst')
-rw-r--r-- | user_guide_src/source/libraries/calendar.rst | 16 |
1 files changed, 14 insertions, 2 deletions
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' => '<table class="calendar">', + 'cal_cell_start' => '<td class="day">', + 'cal_cell_start_today' => '<td class="today">', + ); + + $this->load->library('calendar', $prefs); + + echo $this->calendar->generate(); + *************** Class Reference *************** |