macarena
(Macacm2005)
1
CjuiTabs not works with parameters in renderPartial for a specific view.
it’s my code:
$this->widget('zii.widgets.jui.CJuiTabs', array(
'tabs' => array(
'Friday' => array('content' => $this->renderPartial('franjas',array('canal'=>42,"dia"=>5),true), 'id' => 'tab5'),
'Saturday' => array('content' => $this->renderPartial('franjas',array('canal'=>42,"dia"=>6),true), 'id' => 'tab6'),
'Sunday' => array('content' => 'Content for tab 2', 'id' => 'tab7'),
),
// additional javascript options for the tabs plugin
'options' => array(
'collapsible' => true,
),
));
the parameters are not read in my view "franjas"
Help Me please!
Regards,
Keith
(Kburton)
2
Do you mean you can’t access $canal and $dia?
macarena
(Macacm2005)
3
Exactly,
In my view don’t receives $_GET[‘dia’] and $_GET[‘canal’]
Keith
(Kburton)
4
It won’t, it’ll receive variables called $canal and $dia. Try accessing those directly.
macarena
(Macacm2005)
5
In my View "Franjas" Have:
if(isset($_GET['dia']))
$dia=$_GET['dia'];
else
$dia=1;
if(isset($_GET['canal']))
$Canal=$_GET['canal'];
else
$Canal=1;
echo "dia=".$dia." canal=".$Canal;
But, always write: echo $dia=1 and $Canal =1
Keith
(Kburton)
6
Ignore $_GET, you’ve passed the variable in already. At the top of your view, echo this:
echo "dia=".$dia." canal=".$canal;
Those variables should already be set.