Jump to content

Previous-Next page navigation PROBLEM


rusbb

Recommended Posts

hey this seems to work, but this means that some of the modrewrite wont work...

 

  // Checking whether all arrows are required
    if ($page != 1) {

      // modrewrite support
        if ($chpu == 1) {
            $pervpage =
            "<span>
              <a href=\"{$path}portfolio/{$cat}page_".($page - 1).".html\"
              style=\"font-weight: normal;text-decoration: underline;\">
              << Previous </a></span>";

        } else {
            $pervpage =
              "<span>
               <a href= {$path}index.php?do=portfolio&{$cat}page=". ($page - 1)."
               style=\"font-weight: normal;text-decoration: underline;\">
               << Previous </a></span>";
        }

          if ($page != $total && $total !=0) {
            $nextpage =
              "<span>
               <a href= {$path}index.php?do=portfolio&{$cat}page=". ($page + 1)."
               style=\"font-weight: normal;text-decoration: underline;\">
               Next B>> </a></span>";
          }
          else {
              $nextpage = '<span> Next >> </span>';
          }
  // Checking whether forward arrows are requires
} elseif ($page != $total && $total !=0) {
echo $page;
      // modrewrite support
        if ($chpu == 1) {
            $nextpage =
            "<span>
              <a href=\"{$path}portfolio/{$cat}page_".($page + 1).".html\"
              style=\"font-weight: normal;text-decoration: underline;\">
              Next >> </a></span>";

        } else {
            $nextpage =
              "<span>
               <a href= {$path}index.php?do=portfolio&{$cat}page=". ($page + 1)."
               style=\"font-weight: normal;text-decoration: underline;\">
               Next A>> </a></span>";
        }

          if ($page == 1) {
              $pervpage = '<span> << Previous </span>';
          }
    }


  // Menu display
    $nav_menu =
        '<div class="link_nav">'
          .$pervpage. '    ' .$nextpage.
        '</div>';

// If no ID then display navigation menu
   if(empty($pro_id))
   return $nav_menu;

}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.