Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drupal 7 - Administration - Find node by it's field value

I'm looking for the way for the site's administrator / moderator to find / filter the list of nodes by some field custom value. Field value could be defined by radio / text / checkbox etc.

Default content listing proposes only few filters, it's not enough for sites with huge amount of custom nodes.

like image 611
Fedir RYKHTIK Avatar asked Dec 16 '22 11:12

Fedir RYKHTIK


1 Answers

Use an EntityFieldQuery object, documented here:

http://api.drupal.org/api/drupal/includes--entity.inc/class/EntityFieldQuery/7

The documentation has no examples (ugh), but there's a thread here with some:

http://drupal.org/node/916776

EDIT: Ah, you're talking about administration and not actually writing a module to do it. If that's the case, use a view with exposed filters, like the other guy said. :)

like image 117
Lendrick Avatar answered Feb 05 '23 06:02

Lendrick