Sort order
11 posts
• Page 1 of 1
There is currently no support for sort order in list view. This will be added in version 0.6.0 - early May. Sorry.
-Steve
Yes... click on the header for any column and it will sort on that column. Click again and it will sort reverse.
-Steve
Hi, Thanks for the reply.
It looks like that only sorts the records which are shown in the query (records 1-30 for example), whereas I would like to sort all of the records by that field. I would also like it to sort by a certain field by default, but I'm not sure how to go about doing this. For example, every record has a date in this format 2006-10-27 and I would like it to always show the data sorted by that field unless someone clicks on a different heading. Is there a way I can get it to do this? My apologies as I (obviously) don't have a great deal of php / mySql experience, but I'm keen to learn Thanks again! Ant.
There is some stale javascript code that causes a javascript sort on the displayed records when you click in the header cell (not on the text). But if you click on the text in the header cell, it will sort all of the records- not just the ones displayed on the page.
Best regards Steve
Is it possible to have a default sort mode?
Perhaps by putting the code in index.php? I've been tyring to play around with a block of code towards the top of index.php: if ( !isset( $_REQUEST['-sort'])){ $_REQUEST['-sort'] = 'Firstfield+asc%2C+Secondfield+asc'; $_GET['-sort'] = 'Firstfield+asc%2C+Secondfield+asc'; } this gives me a huge error page....when I comment out the "$_REQUEST['-sort'] =" line, the error goes away but it does not function. Was wondering if there is a way similar to this to set default sorts for list view, for multiple fields. Thanks, Kurtis
You have the right idea.Ê You don't need all the url encoded stuff though: if ( !isset( $_REQUEST['-sort'])){ And make sure you do this before the call to df_init(). Best regards Steve
11 posts
• Page 1 of 1
Who is onlineUsers browsing this forum: No registered users and 32 guests |