adrianmak Posted May 21, 2016 Share Posted May 21, 2016 The user page list in admin only show three fields, name, email and roles I added other fields in user page for other user information like date of birth I want to show additional field column in user page list in admin Admin can add additional column in the column tab, but it will not keep permanent when log-out Link to comment Share on other sites More sharing options...
Robin S Posted May 21, 2016 Share Posted May 21, 2016 Modules > Core > ProcessUser > What fields should be displayed in the page listing? 6 1 Link to comment Share on other sites More sharing options...
loukote Posted January 25, 2019 Share Posted January 25, 2019 Perfect, thanks! Would you know whether there is a way to set the default order to other than by username? Link to comment Share on other sites More sharing options...
Robin S Posted January 25, 2019 Share Posted January 25, 2019 1 hour ago, loukote said: Would you know whether there is a way to set the default order to other than by username? You can set the default sort via a hook in /site/ready.php: $wire->addHookBefore('ProcessPageLister::execute', function(HookEvent $event) { /* @var ProcessPageLister $lister */ $lister = $event->object; // Only for Users lister if($lister->parent->id !== 29) return; // Set the sort to whatever $lister->defaultSort = 'email'; }); Note that the user can change the sort within the lister, and this will persist for the current session. So to get back to the default sort you are setting in the hook the user would need to reset the lister: Or if you want the default sort to apply every time the Users lister is visited (but still allow the user to change the sort while they are using the lister) then you could do this: $wire->addHookBefore('ProcessPageLister::execute', function(HookEvent $event) { /* @var ProcessPageLister $lister */ $lister = $event->object; // Only for Users lister if($lister->parent->id !== 29) return; // Reset the sort when the lister is first loaded if(!$event->config->ajax) $lister->sessionSet('sort', ''); // Set the sort to whatever $lister->defaultSort = 'email'; }); 3 1 Link to comment Share on other sites More sharing options...
loukote Posted January 26, 2019 Share Posted January 26, 2019 @Robin S This will help, thanks for the lesson! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now