Drupal how to add a search filter to admin content page

ThisBetterWork Source

I've never used Drupal before (development or managing content). I was asked to extend the admin content page to have a filter and simply don't know enough to get moving quickly.

Can anyone tell me if adding a search by text filter in the admin content area requires code or is there a CMS feature like adding a node for this task.

If code is required, is there something like a hook for this area? Not sure where to start. I will be investigating on my own but pointers to get me oriented to Drupal would help.

searchdrupaladmin

Answers

answered 2 years ago MilanG #1

By default Drupal provides search mechanism ready to use. But there are also additional module which can improve search experience. You don't need any coding to use that search. You already have search form block ready to use.

Go to Structure -> Blocks and find block called "Search form". Now all you have to do is to put that block in some region and it will appear on front-end. Of course if it's not already styled by your theme it may be needed to put some extra CSS to make it look nice. There are also some template files which you can override and put some your HTML if you need. There's also template file for search results page (which of course will work out of box also).

You may also need to create new block region if you want to place your form at some specific place, not covered by any existing region defined by your theme (easy thing to do!).

comments powered by Disqus