tags:

views:

188

answers:

1

hi , i use codeigniter pagination class in my project it's works fine for me . but there is no option to tell class just show next and previous link , please see this image i want to show result paged plus I'd like to use to link for next and previous instead of numeric links and when the user click on the next button i'll use ajax to retrive request i don't have problem with ajax calls in pagination in numeric links but i want to just show this to link :) i don't think i can explain what i need very good so please see the image . link text

here is my view file :

<div style="height:200px; position:relative">
                      <div id="left_nav"></div>
                      <div id="right_nav"></div>
                          <div style="width:622px;margin:0 auto;">
                          <!-- Gallery Box1 -->
                          <?php foreach($last_profile as $l) : ?>
                          <div id="galleryBoxHolder">
                            <div id="galleryBoxContent">
                                <div id="ImageHolder">
                                    <img src="dummy_data/1.gif" />                             </div>
                                <br />
                                <p><?=$l->artname?> </p>
                                <br />
                              <p style="color:#1a4688">asdasd</p>

                                <p style="color:#1a4688 ; direction:ltr"><?=$l->length?> cm x <?=$l->width?> cm</p>
                            </div>
                          </div>
                          <?php endforeach ;?>
                          <div>
                          <?=$links?>
                          </div>
                      <!-- Gallery box1 :off -->

                        </div>
                    </div>

PLease Check This url which is exactly what i need (@:title Customers Who Bought This Item Also Bought)

+1  A: 

You have a couple of options. The first is really simple, hide the thumbnails portion of the pagination module with CSS. The second options isn't too complex either: modify the pagination class to not include the thumbnails, and instead limit its output to the next/prev buttons. This should be somewhat trivial as well.

Line 199 of the System/Libraries/Pagination Library is where the "digits" are handled. This is where you will remove any appending to the $output variable:

if ($this->cur_page == $loop)
{
  $output .= $this->cur_tag_open.$loop.$this->cur_tag_close; // Current page
}
else
{
  $n = ($i == 0) ? '' : $i;
  $output .= $this->num_tag_open.'<a href="'.$this->base_url.$n.'">'.$loop.'</a>'.$this->num_tag_close;
}
Jonathan Sampson
sorry ! whats your mean about thumbnail ? the thumbnail is my pagination result , as you can see 4 simple div with information . when user click next container show loding then next paged result comes up . like amazoon
mehdi
I'm sorry, Mehdi. I don't understand. If the thumbnails are results, then I only see next and previous. That is what you want, yes?
Jonathan Sampson
aha , thanks for the very fast code :) but next and back link are joined together how do i separate them into left and right ?
mehdi
Please see the original post edits then I'm sure you'll understand me .
mehdi