Overview

This module provides a consistent way for replacing views (that come with modules, for example) with other views.

It does so by making sure every time views_get_view('original') is issued, views_get_view('replacement') is returned.

This is especially handy for modules that come with built-in views, i.e. Commerce Backoffice, and possibly load them in programatically.

Installation and requirements

  1. Download the Views module, enable it and configure to your needs.
  2. Download the Views Override module, enable it and visit Configuration -> System -> Views Override (/admin/config/system/views-override)
  3. Specify which views you want to override, and save the configuration.
  4. You are ready to roll!

Under the hood

Technically, this module is really simple. When overriding a certain built-in view (from another module, such as Commerce backoffice's order listing page at /admin/commerce/orders), this module basically does two things for you:

  1. Firstly, it disables the original view (the one that you marked as overridden on the admin settings form) in code,
  2. Secondly, it alters the load callback (views_get_view) to load your replacement view instead of the original every time the view is requested.

Project information

Releases