Yii Framework Forum: Cjuitabs With Renderpartial Dinamic Not Works! - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Cjuitabs With Renderpartial Dinamic Not Works! Rate Topic: -----

#1 User is offline   makita 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 30-December 10

Posted 20 November 2012 - 09:56 AM

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,
0

#2 User is online   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,650
  • Joined: 04-March 10
  • Location:UK

Posted 20 November 2012 - 10:00 AM

Do you mean you can't access $canal and $dia?
0

#3 User is offline   makita 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 30-December 10

Posted 20 November 2012 - 10:15 AM

View PostKeith, on 20 November 2012 - 10:00 AM, said:

Do you mean you can't access $canal and $dia?


Exactly,
In my view don't receives $_GET['dia'] and $_GET['canal']
0

#4 User is online   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,650
  • Joined: 04-March 10
  • Location:UK

Posted 20 November 2012 - 10:17 AM

It won't, it'll receive variables called $canal and $dia. Try accessing those directly.
0

#5 User is offline   makita 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 30-December 10

Posted 20 November 2012 - 10:23 AM

View PostKeith, on 20 November 2012 - 10:17 AM, said:

It won't, it'll receive variables called $canal and $dia. Try accessing those directly.



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
0

#6 User is online   Keith 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,650
  • Joined: 04-March 10
  • Location:UK

Posted 20 November 2012 - 10:29 AM

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.
0

#7 User is offline   makita 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 30-December 10

Posted 20 November 2012 - 02:18 PM

Sorry,
it's works!


Thanks!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users