Gideon So Posted February 7, 2018 Share Posted February 7, 2018 Hi, is there anyway I can change default filter, say email address, instead of roles in user lister view? Gideon Link to comment Share on other sites More sharing options...
szabesz Posted February 7, 2018 Share Posted February 7, 2018 Hi, Since I have ListerPro, I use that to change the defaults. Sorry if it does not help, maybe some else can can provide another solution, not requiring ListerPro. 1 Link to comment Share on other sites More sharing options...
Robin S Posted February 7, 2018 Share Posted February 7, 2018 Not totally sure what you mean - you just want to save having to click "Add Filter" to add an email address row? You can use a hook in /site/ready.php: $wire->addHookBefore('ProcessPageLister::execute', function(HookEvent $event) { if($this->config->ajax) return; $process = $event->object; // Just for the Users lister... if($this->page->name === 'users') { // Add to existing defaultSelector (or alternatively you could overwrite defaultSelector) $process->defaultSelector .= ', email%='; } }); 3 2 Link to comment Share on other sites More sharing options...
kixe Posted February 8, 2018 Share Posted February 8, 2018 To furthermore change or sort the columns to be displayed in the list, you can do that here:Modules > Configure > ProcessUser 1 Link to comment Share on other sites More sharing options...
Gideon So Posted February 9, 2018 Author Share Posted February 9, 2018 @Robin S You are my hero. Works like a charm and I learn something new about Processwire everyday with the help of all the great community here. Gideon 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