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;

}

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.