[Solved] problem with different paginations in the same tabview.

(Balha) #1


I have different paginations in the same tabview, each one has his own tab page.

and the probleme is when I try to navigate in one pagination bar, the web page is always reloaded with the pagination layed in the default tab.

I didn’t find any way to pass the ‘activeTab’ property as a parameter in the url created by the pagination bar.  :(

Is there anything I'm missing?

Thanks for your help,


(Balha) #2

and here is the solution in two steps :

1- I have overrided the createPageUrl() method so that a $_GET parameter is created and initialized with the active pager.


class MyPagination extends CPagination


	public function createPageUrl($controller,$page)


		$_GET['currentPager'] = $this->pageVar;






2- in the controller I make a test on the content of the $_GET['currentPager'] like the following :




   $tabpages->activeTab = 'first_tab';




   $tabpages->activeTab = 'second_tab';        


(Vidaest) #3

Thanx, this works perfectly.

(Tanimgt) #4

Brothers, i cannt understand you solution, i am very new in yii and got the same problem. can you please help me a little more? where you put the above files ? and how they called ?

tanaks , <tanim>