Views Search Nodes Drupal 7 Tutorial Views Search Exposed Filter With Node type Filters

Learn how to use Views to make Search Functionality with Node type in filters (dropdown)

Demo

Note : Views Module does not come with core Drupal Functionality. You need to download (https://drupal.org/project/views) and install it seperately.

Once Installation id Done Get started:

Step 1 : Click on Structure.


Step 2 : Now click on Views.


Step 3 : Now click on Add New View.


Step 4 : You can Give the Name 'Search Node With Node type' to The View
Below that you can select on Show 'Content'
of Type as 'All' which will show all Nodes in Search/List Results
Click on Checkbox 'Create a Page'
You can Give the Page title as 'Search Node With Node type'
Define path to this 'search_nodes_with_node_type'
Note: Dont Keep path as 'search' as default search for Nodes in Drupal has 'search/node' path and 'search/user' for User Search already which is by default available for Drupal Super User.
Leave display Format to Default values 'Unformated List' and 'without comments'
Besides also keep items to display as '10' and 'user pager'


Step 5 : Click on 'Continue & Edit'


Step 6 : Click on 'Add Filter Criteria'


Step 7 : Now Select 'Content title'


Step 8 : Now Make sure you click on 'Expose Filter '(this will show the field to visitors) and
select operator as 'Contains' (This will match the string to title)


Step 9 : Click on Apply


Step 10 : Click on Save


Step 11 : Click on 'Again Add Filter Criteria'


Step 12 : Now Select 'Content type' and Hit the Apply button


Step 13 : Now Make sure you click on 'Expose Filter '(this will show the field to visitors)


Step 14 : Hit the Apply Button


Step 15 : Click on Save


Step 16 : Now type ../search_nodes_with_node_type in Browser URL


Step 16 : You will see a Text field and a select dropdown with content types.


Step 20 : And finally test the Search Fuctinalty. By typing the string (Title of nodes) with their respective content types selected in dropdown will yield result.


Done

Demo of something you made

If You Think This Post has helped you buy us a Coffee :)

Make Donation

  • Other: $

Donate now