views

18 Dec

Modify views filter query with hook_hook_views_query_alter

in Drupal, Drupal Planet, Drupal Planet, exposed filter, exposed filter, search, search, views, views

If you are familiar with Drupal Views, you might have come across a very nifty feature called exposed filters. If you expose one of the fields as a filter then views provides a widget and a search option, where the exposed field can be searched. There is good video to learn about filter here.

However, we needed to extend the functionality so all the fields of the content type are exposed as  ‘searchable’ fields, not just the exposed fields. If we expose every fields explicitly, then the views filter will create a textbox for each field, which is not pretty. So in our example, we wanted to search ‘Person’ content type. And if the user entered either the first name, last name, address, of any of the values for the fields in the Person content type, a result would be returned. Read more »

18 Dec

Top 10 drupal modules you must have

in cck, devel, Drupal, Drupal, drupal modules, Drupal Planet, Drupal Planet, jquery, views

There are several modules I have used during building sites. I am not going to get into details of the modules because you should visit the modules. But by far, the most important / useful modules for me have been:

1. Views ; You can think of views as output to your custom query (except you don't write the query). There are several ways to present the views and Calendar is one example. So this is a query builder which can execute queries at run time and present the data however you want. Read more »

copyright 2012 10jumps Llc.

copyright 2012 10jumps LLC.