| By: SarCaSM Date: 2005-06-25 Time: 05:37 | Navigation Bar Problemok, so the MergeBlock problem is fixed, but I'm having a problem with the navigation bar.  Its probably a problem with my code.   
Here is my PHP Code:
 | if (isset($story)) { $PageNum = $story;
 } else {
 $PageNum = -1;
 }
 
 $RecCnt = -1 ;
 
 $PageSize = 1;
 
 $tbs->LoadTemplate('tpl/index.html');
 $query = "SELECT stories.Content, images.Filename FROM stories, images WHERE images.ID = stories.Image ORDER BY Timestamp ASC";
 $RecCnt = $tbs->MergeBlock('blk1',$cnx_id,$query,$PageSize,$PageNum,$RecCnt);
 $tbs->MergeNavigationBar('nv','',$PageNum,$RecCnt,$PageSize);
 
 | 
Here is my HTML and TBS Stuff:
 | <div class="menu"> <a class="menu" href="/">Current</a> | <a href="/?story=[nv.prev;endpoint;magnet=a;mtype=m+m]" class="menu">Previous</a>
 | <a href="/?story=[nv.next;endpoint;magnet=a;mtype=m+m]" class="menu">Next</a> | About
 </div>
 
 | 
So when the user goes to the main page without defining $story, the last story is displayed.  With the code I show above, shouldn't the link for previous work and the link for next not be active?  Am I doing something wrong? |