This object is in archive! 

Change default sort order on /responses page

Archived Ryan B. 13 years ago

Hi,


I want to change the default sort order for responses from "popular" to "updated", when someone goes to https://ourresponsesite.com/responses


As I don't see an option for this, so I tried to find the PHP code that controls this, however so far I have not had luck.. Can someone point me in the right direction for what code I need to modify in order to change the default sort order on the /responses page..


Thanks,

Best Answer
photo

Now in 2.0 release, default sorting selected at Administration->Responses is affected on Responses listings

Replies (8)

photo
10

Sorry, meant to post this as a question not an idea.. I tried to edit my post and change it to a question but after I save it still shows as a idea..

photo
10

Ryan Bonham wrote:

Sorry, meant to post this as a question not an idea.. I tried to edit my post and change it to a question but after I save it still shows as a idea..

This bug is fixed. Please see attached file and put it in /public/assets/modules/questions/js/

Files: main.zip
photo
11

Ryan,

You can change default filter to show on responses list page at application/modules/system/controller/ResponsesController.php - line 75

$activeStatus = $this->_getParam('status', 'popular');

or you can take the settings from db to place here: Singular_Core::_("settings")->getSetting("top_responses");

photo
10

Ryan, please redownload archive and change all public/assets folder in your installation.

photo
11

Stas,


Just got back from an emergency trip I had to take. Thanks for the fix and the answer to my question on how to change the default sort. Both are working great.

photo
12

Ryan Bonham wrote:

Stas,


Just got back from an emergency trip I had to take. Thanks for the fix and the answer to my question on how to change the default sort. Both are working great.

You are welcome!

photo
10

Stas,


Your change for the default filter worked great for the https://ourresponsesite.com/responses page..


How can that also be done for the follow page?


https://ourresponsesite.com/responses/responses/questions/status/all


Thank you,

photo
11

Now in 2.0 release, default sorting selected at Administration->Responses is affected on Responses listings

Replies have been locked on this page!