Clear views cache on specific node

Clear views cache on specific node

I want to clear the cache of specific node’s view. In my database in cache_views_data table I found the cid of my view and the format is like “views_name:display:hash” but I cannot find this hash where is reffering to. read more
Clear views cache on specific node

Limit row items to 1 as per the GROUP BY result in Views 3.x

I’m trying to limit row items to 1 as per the GROUP BY result in Views 3.x, below is the view which I’ve created but I’m missing the key part from that, below is the exported code of my view. $view = new view(); $view->name =... read more
Clear views cache on specific node

How to return a missing field as null with db_select union?

I have a db_select union of two tables where some of the columns are different. I would like to select a column that is only in one of the tables. The standard SQL way of doing this seems to set the column as null for the table where the field missing. Is there a way... read more
Clear views cache on specific node

How to put links in a menu programmatically?

I’m using Drupal 7, and modules such as Service links and Flag. I would like to put the links proposed by these modules (share or flag) in a menu (main menu or other). Anybody know the way to follow? read more
Clear views cache on specific node

How do I pass variables to JavaScript?

In your MODULENAME.module file: $testVariable = ‘himanshu’; drupal_add_js(array(‘MODULENAME’ => array(‘testvar’ => $testVariable)), array(‘type’ => ‘setting’));... read more
Clear views cache on specific node

How to change default query plugin for views?

By default Views uses ‘views_plugin_query_default’ plugin. How can I alter something so that Views could use another class for building queries? I found one good example how to write Views query plugins: building views query plugins But this example is for... read more