first commit
[step2_drupal.git] / views / help / view-type.html
blob3285a857107768c9a70060e9070c6d62e86c2ede
1 <!-- $Id: view-type.html,v 1.5 2009/02/20 20:46:48 merlinofchaos Exp $ -->
2 <p>The <strong>view type</strong> 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.</p>
4 <dl>
5 <dt><strong>Normal</strong></dt>
6 <dd>Normal views are stored in your database and are completely local to your system.</dd>
8 <dt><strong>Default</strong></dt>
9 <dd>Default views are stored only in code and are not anywhere in your database. They may be <strong>enabled</strong> or <strong>disabled</strong> but you may not completely remove them from your system. You can <strong>override</strong> 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.</dd>
11 <dt><strong>Overridden</strong></dt>
12 <dd>Overridden views are stored both in code and in the database; while overridden, the version that is in code is completely dormant. If you <strong>revert</strong> the view, the version in the database will be deleted, and the version that is in code will once again be used.</dd>
13 </dl>
15 You may store your views in code with the following procedure:
16 <ol>
17 <li> Create a module to store the views. </li>
18 <li> Add the function <em>MODULENAME_views_default_views()</em> to this module. </li>
19 <li> 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: <em>$views[$view-&gt;name] = $view;</em></li>
20 <li> Make sure the last line of the function is <em>return $views;</em></li>
21 <li> After you make any changes, be sure to <strong>clear the Views' cache</strong>. You may do this from the <strong>Tools</strong> menu.</li>
22 </ol>