The view type describes how this view is stored; Views is capable of having Views entirely in code that are not in the database. This allows modules to easily ship with Views built in, and it allows you to create a module to store your views for easy deployment between development and production servers.
You may store your views in code with the following procedure:
- Normal views are stored in your database and are completely local to your system.
- Default views are stored only in code and are not anywhere in your database. They may be enabled or disabled but you may not completely remove them from your system. You can override the view which will create a local copy of your view. If you do this, future updates to the version in code will not affect your view.
- Overridden views are stored both in code and in the database; while overridden, the version that is in code is completely dormant. If you revert the view, the version in the database will be deleted, and the version that is in code will once again be used.
- Create a module to store the views.
- Add the function MODULENAME_views_default_views() to this module.
- Export the view you wish to store in your module in code. Cut and paste that into the abovenamed function. Make sure the last line of the view is: $views[$view->name] = $view;
- Make sure the last line of the function is return $views;
- After you make any changes, be sure to clear the Views' cache. You may do this from the Tools menu.