How to use datatables pagination but with the same style as cakephp's pagination ?

How to use datatables pagination but with the same style as cakephp's pagination ?

salourisalouri Posts: 3Questions: 1Answers: 0
edited May 2013 in DataTables 1.9
The datatables' pagination is very beautiful. It's the only way I could have many data sets with a separate pagination for each.
BUT!
I also want the pagination to look like the rest of the website's pagination which is cakephp's(2.0) !
I tried to track what classes cakephp paginator is using from cakephp's cake.generic.css, but when I try to use those classes in oStdClasses of full_numbers method (because that's the pagination type I'm using) they don't apply or things get messed up. I know a little css but I'm not really an expert -- yet! ;) --
Any help, guidance, or ideas would be appreciated...
Thank you

Salouri

Replies

  • tpctpc Posts: 12Questions: 0Answers: 0
    Take a look at the pagination plug-ins. They don't have one specifically for php cake however you should be able to create one yourself based on those examples.

    http://datatables.net/plug-ins/pagination
  • salourisalouri Posts: 3Questions: 1Answers: 0
    edited May 2013
    Thanks tpc for the quick responce,
    I really looked at those functions before I post my question. And I don't think the real answer is there. I think it's about understanding how cakephp styles each element of it's pagination and THEN match that with oStdClasses {e.g.
    sTable,
    sPagePrevEnabled,
    sPagePrevDisabled,
    sPageNextEnabled,
    sPageNextDisabled,sPageButton:,
    sPageButtonActive,
    sPageButtonStaticDisabled,
    sPageFirst,
    sPagePrevious,
    sPageNext,
    sPageLast,
    sPaging
    }
    And I see cakephp using these classes:
    /** Paging **/
    .paging {...}
    .paging .current,
    .paging .disabled,
    .paging a {...}
    .paging > span {...}
    .paging > span:hover {...}
    .paging .prev {...}
    .paging .next {...}
    .paging .disabled {...}
    .paging .disabled:hover {...}
    .paging .current {...}

    so how to make dataTables take cakephp paging classes...thats what I don't know! :(
This discussion has been closed.