Pagination on top and bottom of list?

jerkpork

New Member
Hi. Currently my list displays with the pagination only at the bottom of the table. Is there an easy way to make it appear both on the top and the bottom? Thanks!
 
Maybe. You could try cloning a template (copy the standard list 'bootstrap' tmpl folder), edit default.php, and copy the <tfoot> code from around line 66 ...

Code:
<tfoot>
<tr class="fabrik___heading">
<td colspan="<?php echo count($this->headings);?>">
<?php echo $this->nav;?>
</td>
</tr>
</tfoot>

... in to a <thead>. This may not work if the nav's DOM structure uses ID's (as you'd then wind up with duplicate id's, which would probably break things), and I can't remember off the top of my head if it does or not.

-- hugh
 
Hi. Thanks for the suggestion. I'm getting closer!

Here's what happens. If I paste those lines directly before this one

<table class="<?php echo $this->list->class;?>" id="list_<?php echo $this->table->renderid;?>" >

pagination appears in the right place, but does nothing when I click on the page links.

If I place them directly after that line, top pagination works, but it somehow appears in between the table headers and first row of data. Any suggestion on how I can get pagination to be both in the right place and functional? Thanks again!

Never mind. I just realized that there's an additional problem. When the top pagination works, the bottom one doesn't and vice versa.
 
Yes, this is what Hugh said
This may not work if the nav's DOM structure uses ID's (as you'd then wind up with duplicate id's, which would probably break things)
The navigation contains stuff like
<input id="limitstart2" type="hidden" value="20" name="limitstart2">
so you'll get duplicated ids.
You can't duplicate the navigation.
 
Hi. Currently my list displays with the pagination only at the bottom of the table. Is there an easy way to make it appear both on the top and the bottom? Thanks!
How do you feel about just using a sticky table footer instead? I just added that feature to my 'sticky headers' code here... http://fabrikar.com/forums/index.php?threads/fixed-table-headers.39924/#post-207975

I'm using this myself so have been testing it extensively. It seems to work ok in Chrome, IE10, and Firefox - though you may come up with a few issues - but chances are they can be fixed via css. For example I've noticed that if using the sticky headers on a list with an element that can have the order set - or any <th> with an <a href> tag that has a label that is more than one word - you may have to add white-space:nowarp to your css to prevent the text from collapsing in that <th> when it gets 'detached' from the table.

So it might not work on every list for every situation, but if it works for you - that's great.
A few screen shots - from various stages of a page scroll are attached.
 

Attachments

  • on_load.png
    on_load.png
    134.5 KB · Views: 365
  • scroll_down_1.png
    scroll_down_1.png
    122.3 KB · Views: 324
  • scroll_down_middle.png
    scroll_down_middle.png
    158.4 KB · Views: 296
  • scroll_down_nearBottom.png
    scroll_down_nearBottom.png
    139.7 KB · Views: 294
  • scroll_down_bottom.png
    scroll_down_bottom.png
    155.4 KB · Views: 303
How do you feel about just using a sticky table footer instead? I just added that feature to my 'sticky headers' code here... http://fabrikar.com/forums/index.php?threads/fixed-table-headers.39924/#post-207975

I'm using this myself so have been testing it extensively. It seems to work ok in Chrome, IE10, and Firefox - though you may come up with a few issues - but chances are they can be fixed via css. For example I've noticed that if using the sticky headers on a list with an element that can have the order set - or any <th> with an <a href> tag that has a label that is more than one word - you may have to add white-space:nowarp to your css to prevent the text from collapsing in that <th> when it gets 'detached' from the table.

So it might not work on every list for every situation, but if it works for you - that's great.
A few screen shots - from various stages of a page scroll are attached.


Thanks, I'll give it a look! :)
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top