Rename sites directory to be the new config repository

This commit is contained in:
Manuel Cillero 2017-08-09 09:01:23 +02:00
parent 006992b900
commit 433e7eec80
31 changed files with 196 additions and 216 deletions

View file

@ -1,7 +1,7 @@
Views can be stored in the database, which is typical of smaller sites and hobby sites. However, Views may also be stored directly in the code as "default" views, (which simply means they're available by default). Modules often come with views that are specific to the module data, but it's also possible -- and <b>highly</b> recommended -- that sites which have separate "development" and "production" sites export their views into default views in a site-specific module. This makes it very easy to transfer views from dev to production without making database changes.
<h3>Creating a module</h3>
First, create a directory in <em>sites/all/modules</em> for your new module. Call it whatever you like, but for this example we will call it <em>mymodule</em>.
First, create a directory in <em>modules</em> for your new module. Call it whatever you like, but for this example we will call it <em>mymodule</em>.
In this directory, create a <em>mymodule.module</em> file. It can be empty for now, but it should at least contain an opening PHP tag:
<pre>&lt;?php
@ -90,8 +90,8 @@ Be sure to use the right arguments line or the theme system will not properly tr
),
</pre>
The first one is the global 'template_preprocess' function which all templates utilize. It does some basic things such as setting up $zebra and a few other items. See <a href="http://api.drupal.org/api/function/template_preprocess/6">api.drupal.org</a> for specifics.
The first one is the global 'template_preprocess' function which all templates utilize. It does some basic things such as setting up $zebra and a few other items. See <a href="http://api.drupal.org/api/function/template_preprocess/6">api.drupal.org</a> for specifics.
The second one is the plugin specific preprocess. Like 'original hook' it should conform to the name used by the original template. i.e, if the original template was <em>views-view-list.tpl.php</em> then that preprocess function would be named <em>template_preprocess_views_view_list</em>.
The third one is your module's preprocess function, if it needs one. In general, you probably will not need one, and you should only attempt to use one if you are reasonably familiar with the concept of preprocess functions and Drupal's theme system in general. See Drupal's theme documentation for more information.
@ -102,4 +102,3 @@ Be sure to use the right arguments line or the theme system will not properly tr
If you leave the path blank the template file will be searched for in "./" which is the Drupal install base path.
</li>
</ol>