Can we build a views filter by quote author?
I figured it out, go into quotes.views.inc and
ADD:
'filter' => array( 'handler' => 'views_handler_filter_string', ),
INTO:
// Author. $data['quotes_authors']['name'] = array( 'title' => t('Author'), 'help' => t('The name of the quote\'s author.'), 'field' => array( 'handler' => 'views_handler_field_quotes', 'click sortable' => TRUE, ), 'sort' => array('handler' => 'views_handler_sort'), // ADDED BY MORNINGTIME 'filter' => array( 'handler' => 'views_handler_filter_string', ), // END 'skip base' => 'quotes', );
The same trick can be used for citation and bio.
You can also filter in the module http://www.example.com/quotes/author.
Committed to 6.x-1.x-dev.
Just out of curiosity, why are you using Views?
I needed two exposed search fields, to filter by quote and author. I built it with views. Something like:
Search in quote [ ] Search in author [ ] APPLY | RESET
Automatically closed -- issue fixed for 2 weeks with no activity.
Comments
Comment #1
Anonymous (not verified) commentedI figured it out, go into quotes.views.inc and
ADD:
INTO:
The same trick can be used for citation and bio.
Comment #2
nancydruYou can also filter in the module http://www.example.com/quotes/author.
Comment #3
nancydruCommitted to 6.x-1.x-dev.
Just out of curiosity, why are you using Views?
Comment #4
Anonymous (not verified) commentedI needed two exposed search fields, to filter by quote and author. I built it with views. Something like:
Search in quote [ ] Search in author [ ] APPLY | RESET