Rearrange order of pagination components without an entire plugin

Rearrange order of pagination components without an entire plugin

drjekylldrjekyll Posts: 1Questions: 0Answers: 0
edited May 2012 in DataTables 1.9
Greetings,
I'm new around here and I hope I have spent a enough time reading the forums that I haven't missed something obvious. I just wanted to get a hint here before I go way off into left field.

The current four button alternate pagination controls do everything that I need to do. However I'm working with a standard that dictates the arrangement of the elements slightly different. The default is:

[first] [previous] [next] [last]

I need to get the layout to be:

[previous] [next] [first] | [last]

The operation of the controls is exactly the same, I just need to change the order in which they appear.
Is there any easier way to do this than to replicate the current pagination as a plugin and try to change the layout therein?

Thanks,
mark

Replies

  • allanallan Posts: 61,787Questions: 1Answers: 10,115 Site admin
    Hi Mark,

    I'd suggest just copying the current pagination code from DataTables, altering its insert of elements to what you require, rename it and call it a plug-in :-). Alternatively just change the code in DataTables core - moving a single like should do it.

    There isn't a way to get that fine grained control over the elements in the default paging controls - adding that would add significant code to the core, and that's what the plug-ins are for :-)

    Allan
This discussion has been closed.