Manualy overriding default rules and views on feature enable

Manual override

Features is a great tool but has its limitiations. For one, you can't easily add stuff like views and rules which are already in code and provided by other modules.

Commerce for example extensively uses default views and rules. One workaround is to clone the rule/view and add that one to your feature. But then you would like to disable the original one or you end up with duplicate entries. A nice way to do this is with some custom code in your features .module file (which is mostyl empty and features will never override it).

See the 'disable rule on feature enable snippet' here.

DrupalJam 2013

Read More »


This is the company blog of
Drupal specialist

We are located in Breda (Netherlands) and build websites using Drupal. More about us.

Content on this blog is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Netherlands License.

Creative Commons License

Recent Comments