[eluser]AkSuicide[/eluser]
Hello, iam doing the same, i have to calendars, but in the second i dont wanna the next and prev links, i try in various ways but dont work, i hope i can get some help thanks.
Code:
/**CONTROLER**/
function calendario($year = null, $month = null){
$this->load->model('Calendario_Model');
$data['calendario'] = $this->Calendario_Model->generar($year, $month,1);
if (empty($month)) { $month = date("m") + 1;}
else { $month++;}
$data['calendario2'] = $this->Calendario_Model->generar($year, $month,2);
$this->load->view('calendario',$data);
}
/**MODEL**/
function cal_config($cal){
$conf = array();
if($cal==1){
$conf = array(
'show_next_prev' => true,
'next_prev_url' => base_url() . 'admin/calendario'
);
}
else{
$conf = array(
'show_next_prev' => false
);
}
$url_images = base_url();
$conf['template'] ='
{table_open}<table border="0" cellpadding="0" cellspacing="0" class="calendario">{/table_open}
{heading_row_start}<tr class="mes">{/heading_row_start}
{heading_previous_cell}<th><a href="{previous_url}"><img src="'.$url_images.'images/arrow_prev.png"/></a></th>{/heading_previous_cell}
{heading_title_cell}<th colspan="{colspan}" class="mes">{heading}</th>{/heading_title_cell}.....
return $conf;
}
function generar($year,$month,$cal){
$this->load->library('calendar',$this->cal_config($cal));
return $this->calendar->generate($year, $month);
}
/**VIEW*/
<?php echo $calendario;?><br/>
<?php echo $calendario2;?>
thanks for any help!