By: powerpop
Date: 2004-07-30
Time: 12:15
|
i still dont understand MergeNavigation
i am reading and rereading the documents - i have a fairly complicated page with lots of php variable sent in via the URL - does MergeNavigation require that i add more variables to the URL (for pagenum and reccount?)
here is what i want to do - i have a set of thumnails to display on my page - i want to display 15 and then have a nav bar - the nav bar should show 5 pages (if there are that many records) - it should have an arrow to go one page back and one page forward and back to the beginning and to the end
|< < 1 2 3 4 5 > |>
if this is my current call for displaying 15 thumnails, how do i modify it and what does the MergeNavigate look like?
$tbs->MergeBlock('friend',$db->conn,$sql,15,1);
this is where i cannot figure out the docs or examples - here is my best guess
$rec_cnt = $tbs->MergeBlock('friend',$db->conn,$sql,15,1,-1);
$tbs->MergeNavigationBar('nv',array('size'=>5,'pos'=>'centred'),$PageNum,$rec_cnt,15) ;
i dont know what to put in $PageNum
and in the example, making the < and > arrows work for page forward and backward require a variable to be passed in through the URL - i imagine there is no way around that
sorry i am so dense about this template item ...
|
By: Skrol29
Date: 2004-07-31
Time: 00:50
|
Re: i still dont understand MergeNavigation
Hi PowerPop,
Your MergeNavigationBar() call is correct.
$PageNum must be the page number you want to display.
Your application has to somehow manage this data. TBS can't do it for you because it's a user choice. By default, when user first visit the page, $PageNum should be 1. Then user can change the page using the navigation bar.
Your MergeBlock() is correct too, but not optimized because of -1.
But we can see that later when all is ok.
|