Creating custom filters with drupal and views


If you want to know how to create custom filters with Drupal and view please follow the step from the link

http://www.chadcf.com/blog/creating-custom-filters-drupal-and-views

But you need to remember some missing information :-

it is done in views api 2 , so function definition you need to change. for example

$this->query->add_where($this->options[‘group’], “term_node.tid = %d”, $value); should be

$this->query->add_where($this->options[‘group’], “term_node.tid”, $value,’=’);

ofcourse remember to add those files inside module.info file, otherwise you will see broken handlers in your view.

Advertisements

  1. Leave a comment

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: