{"issue":{"created_at":"2011-11-29T16:02:16Z","state":"open","updated_at":"2011-11-29T16:02:23Z","user":{"gravatar_id":"256406243346b9253f8610fb1d1e05f6","id":1215373,"url":"https://api.github.com/users/importer","avatar_url":"https://secure.gravatar.com/avatar/256406243346b9253f8610fb1d1e05f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"importer"},"comments":7,"body":"Sometimes the client wants to re-sort the current list view using another field. This can be done, but when you select that field, you also need to specify a grouping flag. Unfortunately you have to specify the grouping and therefore the output looks like this:\n\n```\n- 315 (the price grouper in gray background)\nrecord 1\nrecord 2\n- 327\nrecord 3\n- 359\nrecord 4\n- 372\nrecord 5\n- 452\nrecord 6\n\n```\n\nThe only way to get around this is to make the sorting field permanent, so its NOT switchable, so the client loses the sorting ability.\n\n--- _Originally created by thyon on November 28th, 2008, at 08:10am (ID 303)_","assignee":{"gravatar_id":"87d2e5aefadcb310f9155df28c2b3582","id":1192057,"url":"https://api.github.com/users/leofeyer","avatar_url":"https://secure.gravatar.com/avatar/87d2e5aefadcb310f9155df28c2b3582?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"leofeyer"},"id":2386292,"number":303,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[{"name":"backend","color":"e6e6e6","url":"https://api.github.com/repos/contao/import/labels/backend"},{"name":"Feature","color":"4183c4","url":"https://api.github.com/repos/contao/import/labels/Feature"}],"title":"Sorting back-end without a \"grouping\" header","closed_at":null,"html_url":"https://github.com/contao/import/issues/303","url":"https://api.github.com/repos/contao/import/issues/303","milestone":{"created_at":"2011-11-29T15:29:29Z","state":"open","due_on":null,"closed_issues":5,"creator":{"gravatar_id":"87d2e5aefadcb310f9155df28c2b3582","id":1192057,"url":"https://api.github.com/users/leofeyer","avatar_url":"https://secure.gravatar.com/avatar/87d2e5aefadcb310f9155df28c2b3582?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"leofeyer"},"number":6,"description":"TYPOlight 2.6.4 (maintenance release)","title":"2.6.4","open_issues":1,"url":"https://api.github.com/repos/contao/import/milestones/6"}},"action":"created","comment":{"created_at":"2011-11-29T16:02:22Z","updated_at":"2011-11-29T16:02:22Z","user":{"gravatar_id":"256406243346b9253f8610fb1d1e05f6","id":1215373,"url":"https://api.github.com/users/importer","avatar_url":"https://secure.gravatar.com/avatar/256406243346b9253f8610fb1d1e05f6?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"importer"},"body":"I agree, but this can be achieved with a onload_callback easily. This can check which field is the sorting field and then disable grouping if it's price. I do like the option for the field, but I think that should be in the eval section, or make it match the rest of the stuff, e.g.\n\n```\n$GLOBALS['TL_DCA']['my_table']['fields']['field'] = array (\n...\n...\n   'sorting' => true,\n   'filter' => true,\n   'group' => true,\n)\n```\n\nWhat would be really kewl is to have a grouper based on a range, e.g. \n\n```\n$GLOBALS['TL_DCA']['my_table']['fields']['field'] = array (\n...\n...\n   'filter' => true,\n   'group' => true,\n   'range' => array(0,500,1000),\n)\n```\n\n--- _Originally created by thyon on September 8th, 2010, at 03:07pm_","id":2932830,"url":"https://api.github.com/repos/contao/import/issues/comments/2932830"}}