CodeIgniter 创建一个日历模板

通过创建一个日历模板你能够100%的控制界面设计。

日历的每一部分都要被放在一对伪变量中,像下面这样:[code]$prefs[‘template’] = ’

{table_open}

{/table_open}

{heading_row_start}

{/heading_row_start}

{heading_previous_cell}

{/heading_previous_cell}
{heading_title_cell}{/heading_title_cell}
{heading_next_cell}{/heading_next_cell}

{heading_row_end}

{/heading_row_end}

{week_row_start}

{/week_row_start}
{week_day_cell}{/week_day_cell}
{week_row_end}{/week_row_end}

{cal_row_start}

{/cal_row_start}
{cal_cell_start}{/cal_cell_end}
{cal_row_end}{/cal_row_end}

{table_close}

<<{heading}>>
{week_day}
{/cal_cell_start}

{cal_cell_content}{day}{/cal_cell_content}
{cal_cell_content_today}

{/cal_cell_content_today}

{cal_cell_no_content}{day}{/cal_cell_no_content}
{cal_cell_no_content_today}

{day}
{/cal_cell_no_content_today}

{cal_cell_blank} {/cal_cell_blank}

{cal_cell_end}

{/table_close}
';

$this->load->library(‘calendar’, $prefs);

echo $this->calendar->generate();[/code]文章来源:http://cwiki.ossez.com/pages/viewpage.action?pageId=2392139