How to add filter on node list in a custom module? I am developing a module. In that module I have a page to list all the nodes of a specific type to user.

I need to:

1- show the nodes each on a row with ' Edit | Delete ' link in each row. 

2- I also need to show a dropdown to give the user ability to filter the nodes by one of the node field.

I've created the first one but I don't know how to add a custom filter to the output.

Would you help me ?

I am working on Drupal 6.

Thank you.
If you are using Views 3 and within CCK you have listed allowed values for the field in question, you can set it up like this.


Select the field in question with the allowed values option, eg, in Filters, select 'Content: Field Name (field_name) - ALLOWED VALUES'
Click on EXPOSE.
Click in the values and select them all.
Click Limit list to selected items.
Save it.


You should now have an exposed filter with a drop down that limits the view to that field.