|
#1
|
|||
|
|||
|
I'm looking to change the default table sort order for Clients (to Company), Packages (to Name), etc. rather than using the ID.
I can see how this is done in the onclick attribute of the table header but was wondering the best way to implement such a change? I could add an onload attribute to the body tag, but for efficiency it would be best to make the initial call to the database pull back the data in the desired order. Also, as I have a large monitor, what would be the simplest way to alter the number of results returned per page? Any suggestions? Thanks. |
|
#2
|
||||
|
||||
|
For the number of pages, see inc/config.php LIST1 define. The default is 20 I believe, but you can increase it here to whatever you like.
http://demo.blesta.com/a-clients.php...pany&order=ASC http://demo.blesta.com/a-packages.ph...name&order=ASC You can use DESC for order to sort descending. Then, just update the template, templates/argentum/a-structure.pdt I believe, and make Browse Clients and Browse Packages link to these URLs respectively (without demo.blesta.com of course) I hope this helps! |
|
#3
|
|||
|
|||
|
Thanks, that's great.
How can I now change the sort order of the tables within the client centre? I would like invoices to sort by due date (ascending), services by renewal date (ascending), tickets by priority (then by last updated, if possible) and transactions by date (descending). |
|
#4
|
||||
|
||||
|
Each of these content sections are AJAX, so you might be able to update their references in the right template, but using their direct links will cause them to be loaded by themselves.
http://demo.blesta.com/a-center.php?...ated&order=ASC http://demo.blesta.com/a-center.php?...rity&order=ASC Also, services are not sortable in v2.5. (They are in v3) |
![]() |
| Bookmarks |
| Tags |
| pid, results, sort, table, uid |
| Thread Tools | |
| Display Modes | |
|
|