diff --git a/D7UPGRADE.txt b/D7UPGRADE.txt deleted file mode 100644 index 08d3a3b4f29..00000000000 --- a/D7UPGRADE.txt +++ /dev/null @@ -1,2 +0,0 @@ -Information about upgrading existing views from Drupal 6 to Drupal 7 is located -in the module's advanced help under api upgrading. diff --git a/README.txt b/README.txt deleted file mode 100644 index 8097eb453ce..00000000000 --- a/README.txt +++ /dev/null @@ -1,19 +0,0 @@ - -Welcome to Views 3. Please see the advanced help for more information. - -If you're having trouble installing this module, please ensure that your -tar program is not flattening the directory tree, truncating filenames -or losing files. - -Installing Views: - -Place the entirety of this directory in sites/all/modules/views -You must also install the CTools module (http://www.drupal.org/project/ctools) to use Views. - -Navigate to administer >> build >> modules. Enable Views and Views UI. - -If you're new to Views, try the Simple Views module which can create some -often used Views for you, this might save you some time. - -Here you can find many modules extending the functionality of Views: - http://drupal.org/taxonomy/term/89 diff --git a/documentation-standards.txt b/documentation-standards.txt deleted file mode 100644 index 6a9c5921d7f..00000000000 --- a/documentation-standards.txt +++ /dev/null @@ -1,5 +0,0 @@ -- If the interface text is *bolded*, it got strong tags. -- If it's a button they need to click, that's *bold* too. -- If the text is not bolded (ex: links to click, options to check), it -got /italicized/. -- If it's user-entered text it got 'single quotes'. diff --git a/help/about.html b/help/about.html deleted file mode 100644 index 8ba77f86dca..00000000000 --- a/help/about.html +++ /dev/null @@ -1,62 +0,0 @@ -The views module allows administrators and site designers to create, manage, and display lists of content. Each list managed by the views module is known as a "view", and the output of a view is known as a "display". Displays are provided in either block or page form, and a single view may have multiple displays. Optional navigation aids, including a system path and menu item, can be set for each page-based display of a view. By default, views may be created that list content (a Node view type), content revisions (a Node revisions view type) or users (a User view type). A view may be restricted to members of specific user roles, and may be added, edited or deleted at the views administration page. - -For more technical users, views can be understood as a user interface to compose SQL-queries and to pull information (Content, Users, etc.) from the database and show it on a screen as desired. - -The "building block" design of the views system provides power and flexibility, allowing parameters to be specified only when needed. While an advanced view may use all of available parameters to create complex and highly interactive applications, a simple content listing may specify only a few options. All views rely on a conceptual framework that includes: - - - -Parallels between the components in the Views interface and an sql query: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sql QueryViews Component
SELECT n.title, u.namefields
FROM {node} n base tableview type
INNER JOIN {users} u ON n.uid = u.uidrelationship
WHERE n.status = 1filter
AND u.uid = arg(1)argument
ORDER BY n.changed DESCsort
diff --git a/help/advanced-settings.html b/help/advanced-settings.html deleted file mode 100644 index 6a168590075..00000000000 --- a/help/advanced-settings.html +++ /dev/null @@ -1,43 +0,0 @@ -In the category Other you have different options to set Advanced configurations in your View. - -Machine Name: -You can change the default machine name of the view. - -Comment: No comment -You can Use the comment option to write comments for your Views, the comments are only shown in the Views UI. Comment your Display for other Maintainer - -Use AJAX: No -If set, this view will use an AJAX mechanism for paging, table sorting and exposed filters. This prevents the entire page from refreshing. It is not recommended that you use this if this view is the main content of the page as it will prevent deep linking to specific pages, but it is very useful for side content. Block displays require this setting to be ON if exposed filters are being used. - -Hide attachments in summary: No - -Use aggregation: No -All fields that are selected for grouping will be collapsed to one record per distinct value. Other fields which are selected for aggregation will have the function run on them. For example, you can group nodes on title and count the number of nids in order to get a list of duplicate titles. -For more Information how aggregation work see the "Use Aggregation" Help Page - -Query settings: Settings - -Here can you set advanced Settings for the SQL Settings - -Field Language: Current user's language - -Caching: None -You can choose a "Time-based" Caching if you want. With it you get the option to choose the length of time raw query results should be cached and "The length of time rendered HTML output should be cached." - -Link display: Page - -CSS class: None -You can define some own CSS Classes for your View - -Theme: Information -Clicking on the "Theme: Information" link provides you with a listing of all posiible theming files. The highlighted files are the ones Views is currently using. All other filenames are suggested templates. -For more Information see the "Theme information" Page diff --git a/help/advanced-style-settings.html b/help/advanced-style-settings.html deleted file mode 100644 index 9c90c0f714a..00000000000 --- a/help/advanced-style-settings.html +++ /dev/null @@ -1,30 +0,0 @@ -In Views 3 you can set Advanced Style Settings, they help you to insert markup of your own from the Views UI, so that you can fairly easily override the default markup without having to restyle via templates. - - - - - - -Usage example - -In a view with a field: -
    -
  1. Configure the field. (Click on the field.)
  2. - -
  3. In the modal that opens, scroll down to Style Settings.
  4. - -
  5. Choose one or more of the three Customize options. This will reveal a dropdown menu where you can choose from one or more HTML tags to use on that field and allow you to add a CSS class specific to that field should you desire.
  6. - -
  7. Decide if you want to keep the Views default classes. Unchecking this box means your markup is *it*.
  8. -
- -In Views 2 you needed for Style Settings the Semantic Views Modul, now the Semantic Views module has been mostly incorporated into Views 3.x. Semantic Views is still around for people who need it, though. For some details on how the original module is different from the Views implementation, please see this issue. diff --git a/help/aggregation.html b/help/aggregation.html deleted file mode 100644 index 83ad880d88f..00000000000 --- a/help/aggregation.html +++ /dev/null @@ -1 +0,0 @@ -See: Group by diff --git a/help/alter-exposed-filter.html b/help/alter-exposed-filter.html deleted file mode 100644 index 454994f71c7..00000000000 --- a/help/alter-exposed-filter.html +++ /dev/null @@ -1,31 +0,0 @@ -Modifying default values of a views exposed form is tricky, because FAPI was not designed to work with GET forms. One consequence is that it often can't tell if textfields (there are others) were submitted or not. - -As a consequence, it *always* thinks the value was submitted, even if it was not. To fix that, Views modifies $form_state['input'][$identifier] with the default value if $form_state['input'][$identifier] was not set. In order to modify the default value in an alter, you need to do this: - -
-<?php
-if (empty($form_state['view']->exposed_input[$identifier])) .
-		{ $form_state['input'][$identifier] = $default_value; }
-?>
-
- -where $identifier is the particular filter for which you want to change the default value, and $default_value is the new default value you want to set. - -If you use a hook_form_FORM_ID_alter or hook_form_alter, you can modify exposed filters on the fly based on information that is external to Views. For example, I modified the exposed filter of a form to set a taxonomy term ID based on the user's GeoIP. - -To do this, I used the following function, where geoip_redirect_get_tid() loads the relevant term id based on the user's current ip_address(): - -
-<?php
-function MODULENAME_form_views_exposed_form_alter(&$form, $form_state) {
-  if(strpos($form['#id'], 'volunteer-directory') !== FALSE) {
-    $city_tid = geoip_redirect_get_tid();
-    if(is_numeric($city_tid) && $city_tid != 7660) {
-      if (empty($form_state['view']->exposed_input['tid']))  {
-        $form_state['input']['tid'] = $city_tid;
-      }
-    }
-  }
-}
-?>
-
diff --git a/help/analyze-theme.html b/help/analyze-theme.html deleted file mode 100644 index 290dc0749f5..00000000000 --- a/help/analyze-theme.html +++ /dev/null @@ -1,24 +0,0 @@ -

Clicking on the "Theme: Information" link provides you with a listing of all posiible theming files. The highlighted files are the ones Views is currently using. All other filenames are suggested templates.

-

You may use any of the following possible theme files to modify individual parts of your view. In total, there are four parts to theming a view.

- - -
- -A breakdown of View output -
- -

The link to the left of each type will give you information about the default template used for that type. You may cut and paste this and place it in your theme with the appropriate template, or you may copy the base file from the views/theme directory (or, if provided by a module, from the module's directory). It is important that you clear the theme registry cache every time you add a new template, or the new template will not be picked up.

- -

Important note: You place your custom template files in your theme directory, not views/theme. This is always true of theming with Drupal. - -

In addition to this tool, the very useful devel module contains a tool called the "Theme developer" which does a good job of visually showing you which areas of your site use which themes. Be careful with it, though, as the theme developer causes the Views edit page to break.

- -

Also, this feature will only work properly with Drupal 6.3 and later; prior to Drupal 6.3 this patch will be required.

diff --git a/help/api-default-views.html b/help/api-default-views.html deleted file mode 100644 index f676ed86fbb..00000000000 --- a/help/api-default-views.html +++ /dev/null @@ -1,103 +0,0 @@ -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 highly 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. - -

Creating a module

-First, create a directory in sites/all/modules for your new module. Call it whatever you like, but for this example we will call it mymodule. - -In this directory, create a mymodule.module file. It can be empty for now, but it should at least contain an opening PHP tag: -
<?php
-
- -It should not contain a closing ?> tag, as the closing ?> tag is not required and anything AFTER the closing tag, such as a space or a linefeed, will be displayed directly to the browser and can potentially cause problems. - -The .module file will contain functions and drupal hooks. Hooks are specially named functions that Drupal will call in order to get your module's response at certain times while generating pages. The only function you will need for this exercise is the 'views_api' hook that tells Views that this module supports the Views API and what version: - -
function mymodule_views_api() {
-  return array('api' => 2.0);
-}
-
- -For other uses you may well add additional functions. - -Second, you need to create a mymodule.info file: - -
name = My module
-description = My site specific module.
-core = 6.x
-
- -Once you have these two files set up, you should be able to activate your new module at the Administer >> Modules page. -

Exporting your views

- -The easiest way to do this is to activate the 'views_export' module, and navigate to Administer >> Structure >> Views >> Tools >> Bulk export Place a check next to each view that you want in your module, type the module name into the text field, and click export. This will create the entire hook_views_default_views() function for you. - -You can also export individual views. If you do this, keep in mind that this export does not include the line that adds the exported $view into the larger $views array: - -
$views[$view->name] = $view
- -To place this into your hook_views_default_views() you will need to place that after the view, and make sure the function returns $views at the end. - -

Placing your exported views into your module

-Cut and paste the entire output of the bulk export tool into mymodule.views_default.inc -- and be sure to put a <?php at the top of the file so that the webserver knows that it's PHP code! Then visit the Views tools page and clear the Views cache. Your views should now be listed as Overridden on the view list page. If you revert these views, they will be removed from the database, but will remain in code. - -

Theming your views in your module

-You can theme these views in the module and not need to rely on the theme to do this at all; and in fact, the theme can continue to override these just like it ordinarily would, even if your module provides a theme. This is very useful for distributing a module where the view needs to look "just so." - -To do this, you need to implement hook_theme() in your module: -
function mymodule_theme($existing) {
-  return array(
-    'views_view__viewname__displayid' => array (
-      'arguments' => array('view' => NULL),
-      'template' => 'views-view--viewname--displayid',
-      'base hook' => 'views_view',
-      'path' => drupal_get_path('module', 'mymodule'),
-    ),
-  );
-}
-
- -There are a small number of gotchas in doing this that you must be aware of. - -
    -
  1. When referring to a template filename, you always use dashes in the name. i.e, views-view--viewname--displayid.tpl.php. However, when referring to the hook or function names, you use underscores instead of dashes. i.e, views_view and views_view__viewname__displayid
  2. - -
  3. The 'arguments' change based upon which of the 3 types you're overriding. There's the 'display', the 'style' and the 'row' style. The above code is assuming the display, which is usually just views_view. Here are the possibilities: - -
    display: array('view_array' => array(), 'view' => NULL),
    -style: array('view' => NULL, 'options' => NULL, 'rows' => NULL, 'title' => NULL),
    -row: array('view' => NULL, 'options' => NULL, 'row' => NULL, 'field_alias' => NULL),
    -field: array('view' => NULL, 'field' => NULL, 'row' => NULL),
    -
    - -Be sure to use the right arguments line or the theme system will not properly translate. -
  4. -
  5. The 'template' line should never include the extension, so drop the .tpl.php from it.
  6. - -
  7. You need to make sure that the Views preprocess functions get registered. The 'base hook' line in the definition does that, but it can only do it if it comes after the Views registration, which actually happens very late in theme building. 99% of the time, your module will come before Views. You have two choices to deal with this: -
      -
    1. Set your module's weight to 11 or higher in the database. Views' weight is 10. You can make this happen automatically when the module is first installed by creating a mymodule.install file and using this code: -
      function mymodule_install() {
      -  db_query("UPDATE {system} SET weight = 11 WHERE name = 'mymodule'");
      -}
      -
      - If you use this method, the base hook should be set to the name of the original template being used. i.e, if this is a variate of views-view-list.tpl.php, this should be 'views_view_list'. -
    2. -
    3. You can also just force it to list the preprocessors without actually having to detect them. This doesn't require modifying your module's weight, which is not always possible, you can insert this code into the array: -
            'preprocess functions' => array(
      -        'template_preprocess',
      -        'template_preprocess_views_view',
      -        'mymodule_preprocess_views_view__viewname_displayid',
      -      ),
      -
      - - 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 api.drupal.org for specifics. - - The second one is the plugin specific preprocess. Like 'base hook' it should conform to the name used by the original template. i.e, if the original template was views-view-list.tpl.php then that preprocess function would be named template_preprocess_views_view_list. - - 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. -
    4. -
    -
  8. -
  9. - If you leave the path blank the template file will be searched for in "./" which is the Drupal install base path. -
  10. -
diff --git a/help/api-example.html b/help/api-example.html deleted file mode 100644 index 654fbffcdc3..00000000000 --- a/help/api-example.html +++ /dev/null @@ -1,179 +0,0 @@ - -For the new table defined by the Node example module to be understood by the views module you need to create a node_example.views.inc file that describes the table and its relationships to the rest of the database. In order for views to know that this file is to be loaded you need to implement hook_views_api. This is done by adding the following function into your node_example.module file - -
-<?php
-/**
- * Implements hook_views_api().
- *
- * This tells drupal that there is Views integration file named
- * module-name.views.inc
- */
-function node_example_views_api() {
-  // Note that you can include 'path' in this array so that your views.inc
-  // file can be stored in a different location.
-  return array(
-    'api' => 2.0
-  );
-}
-?>
-
- -Below is the contents of a simple node_example.views.inc file that allows you to create views that include the new color and quantity information. - -
-<?php
-
-/**
- * This file is used to tell the views module about the new node_example table.
- *
- * Database definition:
- * @code
- *   CREATE TABLE node_example (
- *     vid int(10) unsigned NOT NULL default '0',
- *     nid int(10) unsigned NOT NULL default '0',
- *     color varchar(255) NOT NULL default '',
- *     quantity int(10) unsigned NOT NULL default '0',
- *     PRIMARY KEY (vid, nid),
- *     KEY `node_example_nid` (nid)
- *   )
- * @endcode
- */
-
-function node_example_views_data()  {
-  // Basic table information.
-
-  // ----------------------------------------------------------------
-  // node_example table
-  //  New group within Views called 'Example'
-  //  The group will appear in the UI in the dropdown tha allows you
-  //  to narrow down which fields and filters are available.
-
-  $data = array();
-  $data['node_example']['table']['group']  = t('Example');
-
-  // Let Views know that our example table joins to the 'node'
-  // base table. This means it will be available when listing
-  // nodes and automatically make its fields appear.
-  //
-  // We also show up for node revisions.
-  $data['node_example']['table']['join'] = array(
-    'node_revisions' => array(
-      'left_field' => 'vid',
-      'field' => 'vid',
-    ),
-    'node' => array(
-      'left_field' => 'vid',
-      'field' => 'vid',
-    ),
-  );
-
-  // quantity
-  $data['node_example']['quantity'] = array(
-    'title' => t('Quantity'),
-    'help' => t('Quantity of items.'),
-    'field' => array(
-      'id' => 'numeric',
-      'click sortable' => TRUE,
-     ),
-    'filter' => array(
-      'id' => 'numeric',
-    ),
-    'sort' => array(
-      'id' => 'standard',
-    ),
-  );
-
-  // Color
-  $data['node_example']['color'] = array(
-    'title' => t('Color'),
-    'help' => t('Color of item.'),
-
-    'field' => array(
-      'id' => 'standard',
-      'click sortable' => TRUE,
-     ),
-     'filter' => array(
-      'id' => 'string',
-     ),
-     'argument' => array(
-       'id' => 'string',
-     ),
-     'sort' => array(
-      'id' => 'standard',
-     ),
-  );
-
-  return $data;
-}
-
-?>
-
- -Some notes on usage: - -Within Views, click on the Add tab. You have a number of type options here. Normally you would select either 'Node' (if you only want to display information on current nodes) or 'Node revision' (if you want to display information on all revisions of the nodes) - -With this configuration you always pull out of the database, data for every single node, whether or not it has color and quantity information. To display information on just those nodes that have color and quantity information you can use a filter so that only nodes which don't have a NULL color or a NULL quantity are displayed. - -

Type/relationship extension

- -When your tables have first class data, you will often need to have own View types and View relationships defined. With the current node_example table this isn't required although I try to justify it below on an efficiency basis. See [[http://groups.drupal.org/node/17236#comment-58980|this discussion]] as to why it isn't justified. - -Pulling data out of the database for every node when you only want data for the new Example node type is inefficient. To reduce the initial data extraction to just that relating to the new Example nodes requires that you make the node_example table the base table. This can be done by adding the following code into the node_example.views.inc file just before the 'return $data;' - -
-<?php
-
-//  **** Begin optional extra for type and relationships ****
-
-  //  Use node_example as a new base table
-  //     by creating a new views type called 'Node example'
-  //  This allows it to be selected as the 'view type'
-  //          when you initially add a new view.
-  $data['node_example']['table']['base'] = array(
-    'field' => 'vid',
-    'title' => t('Node example'),
-    'help' => t("Node example type with color and quantity information."),
-    'weight' => -9,
-  );
-
-  // When using the new 'Node example' type you need to use relationships
-  //   to access fields in other tables.
-
-  // Relationship to the 'Node revision' table
-  $data['node_example']['vid'] = array(
-    'title' => t('Node revision'),
-    'help' => t('The particular node revision the color and quantity is attached to'),
-    'relationship' => array(
-      'label' => t('Node revision'),
-      'base' => 'node_revisions',
-      'base field' => 'vid',
-      // This allows us to not show this relationship if the base is already
-      // node_revisions so users won't create circular relationships.
-      'skip base' => array('node', 'node_revisions'),
-    ),
-  );
-
-  // Relationship to the 'Node' table
-  $data['node_example']['nid'] = array(
-    'title' => t('Node'),
-    'help' => t('The particular node the color and quantity is attached to'),
-    'relationship' => array(
-      'label' => t('Node'),
-      'base' => 'node',
-      'base field' => 'nid',
-      // This allows us to not show this relationship if the base is already
-      // node so users won't create circular relationships.
-      'skip base' => array('node', 'node_revisions'),
-    ),
-  );
-
-//  **** End optional extra for type and relationships ****
-
-?>
-
- -The above code adds a new 'Node example' to the view types that can be selected within the Add tab window of views. Selecting this sets the node_example table to be the base table. - -If you select 'Node example' as view type, when you initially go into the edit window of views you will find the only fields available are the color and quantity fields. To get fields from other tables you need to add a relationship. Relationships may be found at the top in the same column as the fields. diff --git a/help/api-forms.html b/help/api-forms.html deleted file mode 100644 index 27729091d5c..00000000000 --- a/help/api-forms.html +++ /dev/null @@ -1,88 +0,0 @@ -Views allows handlers to output form elements, wrapping them automatically in a form, and handling validation / submission. -The form is multistep by default, allowing other modules to add additional steps, such as confirmation screens. - -

Implementation

-A views handler outputs a special placeholder in render(), while the real form with matching structure gets added in views_form(). -When the View is being preprocessed for the theme file, all placeholders get replaced with the rendered form elements. - -The views handler can also implement views_form_validate() and views_form_submit(). -
-  function render($values) {
-    return '<!--form-item-' . $this->options['id'] . '--' . $this->view->row_index . '-->';
-  }
-
-  function form_element_name() {
-    // Make sure this value is unique for all the view fields
-    return $this->options['id'];
-  }
-
-  function form_element_row_id($row_id) {
-    // You could use values from $this->view->result[$row_id]
-    // to provide complex row ids.
-    return $row_id;
-  }
-
-  function views_form(&$form, &$form_state) {
-    // The view is empty, abort.
-    if (empty($this->view->result)) {
-      return;
-    }
-
-    $field_name = $this->form_element_name();
-    $form[$field_name] = array(
-      '#tree' => TRUE,
-    );
-    // At this point, the query has already been run, so we can access the results
-    foreach ($this->view->result as $row_id => $row) {
-      $form_element_row_id = $this->form_element_row_id($row_id);
-      $form[$field_name][$form_element_row_id] = array(
-        '#type' => 'textfield',
-        '#title' => t('Your name'),
-        '#default_value' => '',
-      );
-    }
-  }
-
-  // Optional validate function.
-  function views_form_validate($form, &$form_state) {
-    $field_name = $this->form_element_name();
-    foreach ($form_state['values'][$field_name] as $row_id => $value) {
-      if ($value == 'Drupal') {
-        form_set_error($field_name . '][' . $row_id, "You can't be named Drupal. That's my name.");
-      }
-    }
-  }
-
-  // Optional submit function.
-  function views_form_submit($form, &$form_state) {
-    // Do something here
-  }
-
- -The form is multistep by default, with one step: 'views_form_views_form'. -A "form_example" module could add a confirmation step by setting: -
- $form_state['step'] = 'form_example_confirmation';
-
-in form_example_views_form_submit(). -Then, views_form would call form_example_confirmation($form, $form_state, $view, $output) to get that step. - -Important: You can fetch the Views object in form_alter and validate / submit hooks from the form state: -
-  $view = $form_state['build_info']['args'][0];
-
- -

Relevant Views functions

- - -

Hooks

- diff --git a/help/api-handler-area.html b/help/api-handler-area.html deleted file mode 100644 index ad8ec563635..00000000000 --- a/help/api-handler-area.html +++ /dev/null @@ -1,45 +0,0 @@ -In Views areas (header, footer, empty-text) are pluggable, this means you can write your own php logic to place whatever you want. - -

Requirements

-You should have read API and Tables API to get a basic knowledge -how to extend views. - -

Create your own area handler

- -The first step is to tell views: Hey i want to add a new area handler. -Therefore you have to implement hook_views_data and add a new one. For example: - -
-function yourmodule_views_data() {
-  $data['views']['collapsible_area'] = array(
-    'title' => t('Collabsible Text area'),
-    'help' => t('Provide collabsible markup text for the area.'),
-    'area' => array(
-      'handler' => 'yourmodule_handler_collapsible_area_text',
-    ),
-  );
-}
-
- -The second step is to write this handler. Therefore create a file called yourmodule_handler_collapsible_area_text.inc and -add it to the .info file of your module. - -Then add content to your area file like this: -
-class yourmodule_handler_collapsible_area_text extends views_handler_area_text {
-  function render($empty = FALSE) {
-    // Here you just return a string of your content you want.
-    if ($render = parent::render($empty)) {
-      $element = array(
-        '#type' => 'fieldset',
-        '#title' => t('Title'),
-        '#value' => $render,
-      );
-      $output = theme('fieldset', $element);
-      return $output;
-    }
-  }
-}
-
- -As on every handler you can add options so you can configure the behavior. If the area isn't shown yet in the views interface, please clear the cache :) diff --git a/help/api-tables.html b/help/api-tables.html deleted file mode 100644 index 34dc064ad86..00000000000 --- a/help/api-tables.html +++ /dev/null @@ -1,262 +0,0 @@ -Tables are described to Views by implementing hook_views_data(). This should be placed in MODULENAME.views.inc and it will be autoloaded (see Views' API). The hook implementation should return an array of table information, keyed by the name of the table. For example, if your module is describing three tables, 'foo', 'bar' and 'baz', your hook will look like this: -
  /**
-   * Implements hook_views_data().
-   */
-  function MODULENAME_views_data() {
-    $data = array(
-      'foo' => array(
-        // ...info about the table named 'foo'...
-      ),
-      'bar' => array(
-        // ...info about the table named 'bar'...
-      ),
-      'baz' => array(
-        // ...info about the table named 'baz'...
-      ),
-    );
-    return $data;
-  }
-
- -The key should be the actual database name of the table (not including prefix), but it can be an alias as long as the join information (explained later) contains the real name of the table. - -Each item in the array should be a field in the table, with the exception of a special information section called 'table'. Example: - -
$data['foo'] = array(
-  'table' => array(
-    // ... info about the table, described later ...
-  ),
-  'bar' => array(
-    // ... info about the field named 'bar', i.e, foo.bar,
-  ),
-  'baz' => array(
-    // ... info about the field named 'baz', i.e, foo.baz,
-  ),
-);
-
- -Once you get down to an array that contains actual data, that piece of the array will often be referred to as the definition. - -

The 'table' section

-Each table should have a 'table' section in it, which is used to set default information for the table, such as the group, as well as the very important joins and whether or not this is a base table. - -First, there are several items that are actually for fields but can be placed here so that all fields within the table inherit them: -
-
group
-
The name of the group this item will be with. In the UI, this is displayed as Group: Title. For example, "Node: Node ID", "Taxonomy: Term description", etc. It is important to be consistent with groups, because the UI sorts by group, and allows filtering by group to find fields as well.
-
title
-
The actual name of the field; it should be concise and descriptive.
-
help
-
A longer description to help describe what the field is or does. It should try to be only a line or two so as not to clutter the UI.
-
- -In general, having 'title' and 'help' at the table level doesn't make a lot of sense, but usually every item in a table is in the same group. Thus it is very common to define the 'group': - -
-  $data['foo']['table']['group'] = t('Foo');
-
- -The other items in the 'table' section are described in the following sections. - -

'base': Base table

-If your table is a base table -- meaning it can be the primary, central table for a View to use, you can declare it to be a base table. This primarily provides UI information so that it can be selected. -For example: -
-  // Advertise this table as a possible base table
-  $data['node']['table']['base'] = array(
-    'field' => 'nid',
-    'title' => t('Node'),
-    'help' => t("Nodes are a Drupal site's primary content."),
-    'weight' => -10,
-  );
-
- -The following items are available in the base section: -
-
field
-
The primary key field for this table. For Views to treat any table as a base table, it must have a primary field. For node this is the 'nid', for users this is the 'uid', etc. Without a single primary key field (i.e. not a composite key), Views will not be able to utilize the table as a base table. If your table does not have a primary key field, it is not too difficult to just add a serial field to it, usually.
-
title
-
The title of this table in the UI. It should be singular and describe the object that this table contains from the perspective of the user.
-
help
-
A short piece of text to describe what object this table contains.
-
database
-
If this table is held in a different database from your Drupal database, specify it as a string in the exact same format as the settings.php file. This is a special purpose variable that will probably be only used in site specific code, and it must be the same database type as your Drupal database. Also, don't try to join it to any table that isn't in the same database. That'll just create all kinds of silly errors. For example: -
-  // In settings.php for your site
-  // Your drupal (site) database needs to be called 'default'
-  $db_url['default'] = 'mysqli://user:pass@host/drupal_db';
-  $db_url['budget'] = 'mysqli://user:pass@host/other_db';
-
-Then when you are describing the external database in your base table you would write something like this: -
-  $data[$table]['table']['base'] = array(
-    'field' => 'Primary key',
-    'title' => t('Field name'),
-    'help' => t('Field description'),
-    'database' => 'budget',
-    'weight' => -10,
-    );
-
-
-
- -

'join': Linking your table to existing base tables

-For Views to use your table, it has to either be a base table, or know how to link to an existing base table. Or sometimes both. Views uses this information to create a path to the base table; when the table is added to the query, Views will walk along this path, adding all tables required into the query. - -
- -How taxonomy_term_data joins to node -
- -In the above example, to use these with 'node' as the base table, both 'taxonomy_term_data' and 'term_node' need to be defined, and they each need a join handler for node: - -
-$data['taxonomy_term_data']['table']['join']['node'] = array(
-  'left_table' => 'term_node',
-  'left_field' => 'tid',
-  'field' => 'tid',
-);
-
- -The above can be read as "In order to join to the node table, the taxonomy_term_data table must first link to the term_node table, and they join on the 'tid' field.". When adding this table to the query for a node view, Views will look at this and then look for the term_node table. - -
-$data['term_node']['table']['join']['node'] = array(
-  'left_field' => 'nid',
-  'field' => 'nid',
-);
-
- -Above, the fact that 'left_table' is left out lets us know that term_node links directly to the node table, using the 'nid' field on both sides of the join. - -Quite a few more fields are available in this definition: -
-
handler
-
The name of the handler object to use. Defaults to 'Drupal\views\Join'. You may create custom join handlers that may or may not use any of the data below, as they see fit.
-
table
-
Table to join. This is optional, and should only be used if the table being referenced is an alias.
-
field
-
Field to join on. This is required.
-
left_table
-
The next step toward the final destination. If this is the final destination it may be omitted.
-
left_field
-
The field to join to on the left side. This is required.
-
type
-
Either LEFT (default) or INNER.
-
extra
-
Either a string that's directly added, or an array of items. Each item is, itself, an array: -
-
table
-
table should not be set in most cases, as it would be filled with the right table alias. Set it to NULL if you want to use a formular in "field"
-
field
-
Field or formula, therein "%alias" can be used to reference the right table.
-
operator
-
Similar to filters, this is the operator, such as >, <, =, etc. Defaults to = or IN.
-
value
-
Must be set. If an array, operator will be defaulted to IN.
-
numeric
-
If true, the value will not be surrounded in quotes, and %d will be used for its placeholder.
-
-
-
extra type
-
How all the extras will be combined. Either AND or OR. Defaults to AND.
-
- -

Describing fields on tables

-Aside from the special table tag, each table can also have an unlimited number of field designations; these correspond roughly to fields on the table, though it is very common to use non-fields to display data that isn't directly in a field, such as data arrived from formulae, or special links related to the object the table is part of. - -Each field is described in the view data with an array, keyed to the database name of the field. This array may contain some information fields, plus an entry in each of the five types of items Views has per field: argument, field, filter, relationship, sort. For example: - -
-$data['node']['nid'] = array(
-  'title' => t('Nid'),
-  'help' => t('The node ID of the node.'), // The help that appears on the UI,
-  // Information for displaying the nid
-  'field' => array(
-    'handler' => 'views_handler_field_node',
-    'click sortable' => TRUE,
-  ),
-  // Information for accepting a nid as an argument
-  'argument' => array(
-    'handler' => 'views_handler_argument_node_nid',
-    'name field' => 'title', // the field to display in the summary.
-    'numeric' => TRUE,
-    'validate type' => 'nid',
-  ),
-  // Information for accepting a nid as a filter
-  'filter' => array(
-    'handler' => 'views_handler_filter_numeric',
-  ),
-  // Information for sorting on a nid.
-  'sort' => array(
-    'handler' => 'views_handler_sort',
-  ),
-);
-
- -The above example describes the 'nid' field on the 'node' table, providing 4 of the 5 handlers. Note that while field is normally expected to be the database name of the field, it doesn't have to be; you can use an alias (which is how you get multiple handlers per field) or something completely made up for items that aren't tied to the database. For example: - -
-$data['node']['edit_node'] = array(
-  'field' => array(
-    'title' => t('Edit link'),
-    'help' => t('Provide a simple link to edit the node.'),
-    'handler' => 'views_handler_field_node_link_edit',
-  ),
-);
-
- -The above handler definition an edit link to a node, but this isn't a field in and of itself. For aliased fields, here is another example: - -
-$data['users']['uid_current'] = array(
-  'real field' => 'uid',
-  'title' => t('Current'),
-  'help' => t('Filter the view to the currently logged in user.'),
-  'filter' => array(
-    'handler' => 'views_handler_filter_user_current',
-  ),
-);
-
- -The above definition provides an alternate filter handler on the uid field for the current user. - -The following items are allowed in the field definition: - -
-
group, title, help
-
As above, these fields are for the UI. If placed here, any of these fields will override a setting on the base table.
-
real field
-
If this field is an alias, the "real field" may be placed here, and the handler will never know the difference.
- -
field
-
A handler definition for the "Field" section, which is a field that may be displayed in a view. The definition is an array; the contents of the array are completely up to the handler, other than the 'handler' definition. If omitted, handler will default to 'views_handler_field'.
-
filter
-
A handler definition for the "Filters" section, which will be used to apply WHERE clauses to the view. The definition is an array; the contents of the array are completely up to the handler, other than the 'handler' definition. If omitted, handler will default to 'views_handler_filter'.
-
sort
-
A handler definition for the "Sort criteria" section, which will be used to add an ORDER BY clause to the view. The definition is an array; the contents of the array are completely up to the handler, other than the 'handler' definition. If omitted, handler will default to 'views_handler_sort'.
-
relationship
-
A handler definition for the "Field" section, which is a way to bring in new or alternative base tables in the view. The definition is an array; the contents of the array are completely up to the handler, other than the 'handler' definition. If omitted, handler will default to 'views_handler_relationship'. All relationships need the 'base' to be set. The basic relationship handler also requires 'base field' to be set. 'base' and 'base field' represent the "right" half of the join that will use this field as the left side.
-
argument
-
A handler definition for the "Field" section, which is method of accepting user input from the URL or some other source. The definition is an array; the contents of the array are completely up to the handler, other than the 'handler' definition. If omitted, handler will default to 'views_handler_argument'.
-
- -For more information about what handlers need/use what data, visit the Views API site and check out the available handlers. - -

Support old tabledata

-If you need to rename some tables/fields you can create some references in the views data to be able to continue to work. -Therefore you create the whole table structure of the current views data. - -If you have to rename a single table you need to specify -
-$data['oldtable']['moved to'] = 'newtable';
-
- -If you have to rename/move a single a field to another table you specify -
-$data['oldtable']['oldfield']['field']['moved to'] = array('newtable', 'newfield');
-
-or -
-$data['oldtable']['oldfield']['moved to'] = array('newtable', 'newfield');
-
diff --git a/help/api-upgrading.html b/help/api-upgrading.html deleted file mode 100644 index a3b36d585e1..00000000000 --- a/help/api-upgrading.html +++ /dev/null @@ -1,224 +0,0 @@ -In order to take advantage of the changes in Drupal 7, Views has gone through several API changes. -Here's what you should know. - -

Handler registry

- -Views now uses Drupal's dynamic-loading code registry. -You can safely remove your implementations of hook_views_handlers(), since they are no longer used. - -Please remember to specify the handlers in your module's .info file. For example: -
-name = Example module
-description = "Gives an example of a module."
-core = 8.x
-files[] = example.module
-files[] = example.install
-
-; Views handlers
-files[] = includes/views/handlers/example_handler_argument_string.inc
-
- -

Removed handlers

- -Note that views_handler_filter_float has been removed. -This functionality is now handled by views_handler_filter_numeric. -There's no need for having a special handler any more, thanks to the new DB layer in Drupal 7. - -views_handler_sort_formula has been removed. -Everyone who used it can extend from views_handler_sort, too. - -

Ctools dependency

-Views requires ctools now, so it can use the dependency system of ctools. -The only thing you have to do is to remove views_process_dependency. - -

Changed add_where api

-If your field is a plain sql field: -
-$this->query->add_where($this->options['group'], "$this->tableAlias.$this->realField " . $this->operator . " '%s'", $this->value);
-
-has to be converted to -
-$this->query->add_where($this->options['group'], "$this->tableAlias.$this->realField", $this->value, $this->operator);
-
-If your field is a complex where condition: -
-$this->query->add_where($this->options['group'], "$upper($field) NOT LIKE $upper('%%%s')", $this->value);
-
-has to be converted to -
-$placeholder = $this->placeholder();
-$this->query->add_where_expression($this->options['group'], "$field LIKE $placeholder", array($placeholder => '%' . db_like($this->value)));
-
-placeholder() generates a automatic unique placeholder for you. - -add_where with operator 'formula' can be converted to add_where_expression. -add_having with operator 'formula' can be converted to add_having_expression. - -

Changed place for display specific settings

-In the new ui the new place for display settings is at the top of the second column. -Therefore use something like this code in your display plugin: -
-$categories['block'] = array(
-  'title' => t('Block settings'),
-  'column' => 'second',
-  'build' => array(
-    '#weight' => -10,
-  ),
-);
-
- -

Changed filter settings and associated class variables

-'optional' and 'single' are now 'required' and 'multiple', the logic is now opposite. -Also, the 'no_single' and 'no_optional' class variables (known as "object flags" in the API docs) -are now 'always_multiple' and 'always_required'. - -

Changed argument settings

-See the init() function in views_handler_argument for an overview of everything -that changed. - -1. The default actions 'summary asc', 'summary desc', 'summary asc by count', 'summary asc by count' -have been replaced by a single 'summary' action (which takes the sort order and type as options). -2. Wildcards are now called exceptions. -
-$this->options['exception']['value'] = $options['wildcard'];
-$this->options['exception']['title'] = $options['wildcard_substitution'];
-
-3. Summary plugin options are now stored in 'summary_options' instead of 'style_options' -
-$this->options['summary_options'] = $options['style_options'];
-
-4. The selected summary plugin is no longer stored in 'style_plugin'. -
-$this->options['summary']['format'] = $options['style_plugin'];
-
-5. The validator options have been moved. -
-$options['validate']['type'] = $options['validate_type'];
-$options['validate']['fail'] = $options['validate_fail'];
-
-6. The validator settings have been moved from $form['argument_validate'] to ['validate_options'] -This means that dependent code in validate plugins needs to change. -Example change for views_plugin_argument_validate_user: -
-    $form['roles'] = array(
-       '#dependency' => array(
--        'edit-options-argument-validate-user-restrict-roles' => array(1),
-+        'edit-options-validate-options-user-restrict-roles' => array(1),
-       ),
-
- -

The introduction of get_value() and sanitizeValue()

-The views_handler class got two new functions: -
-/**
- * Get the value that's supposed to be rendered.
- *
- * @param $values
- *   An object containing all retrieved values.
- * @param $field
- *   Optional name of the field where the value is stored.
- */
-function get_value($values, $field = NULL) {
-  $alias = isset($field) ? $this->aliases[$field] : $this->field_alias;
-  if (isset($values->{$alias})) {
-    return $values->{$alias};
-  }
-}
-
-/**
- * Sanitize the value for output.
- *
- * @param $value
- *   The value being rendered.
- * @param $type
- *   The type of sanitization needed. If not provided, check_plain() is used.
- */
-public function sanitizeValue($value, $type = NULL) {
-  switch ($type) {
-    case 'xss':
-      $value = filter_xss($value);
-      break;
-    case 'url':
-      $value = check_url($value);
-      break;
-    default:
-      $value = check_plain($value);
-      break;
-  }
-  return $value;
-}
-
-These functions are meant to be used in the render() functions of field handlers, -for fetching data (usually by alias) from the $values object, and for sanitizing values. - -The abstraction of fetching data from rendering data is important because -different query backends have different ways of storing data in $values, and the field alias -is a SQL specific thing. So instead of overriding the whole render() function and copying -all of the logic there (as well as having to constantly keep up with upstream Views changes), -the backend can just override get_values(), which is significantly less code. - -Of course, different ways of fetching and displaying data might require different -ways of sanitizing it, hence the usage of the sanitizeValue() function. - -Examples of converting render() field handler implementations: -
-// This
-$value = $values->{$this->field_alias};
-// Becomes this
-$value = $this->get_value($values);
-
-// And this
-$format = $values->{$this->aliases['format']};
-// Becomes this
-$format = $this->get_values($values, 'format');
-
-// Instead of this:
-return check_plain($value);
-// We write:
-return $this->sanitizeValue($value);
-
-// Since sanitizeValue() supports different sanitization functions, this:
-return filter_xss($value);
-// Can become:
-return $this->sanitizeValue($value, 'xss');
-
- - -

Changed views_get_page_view

-In contrast to 6.x views_get_page_view now does stores the current view, not the current page display. - -

Removed views-view-row-node

-Due to changes in comment.module there is no extra views-view-row-node template needed to display the comments. If you do some custom stuff there you should now be able to do everything in your node.tpl.php. - -

Entity type Key on Base tables

-During the development of the drupal7 version of views the entity type associated with a table got added to $data['name']['table']['base']['entity type']. It should be moved to $data['name']['table']['entity type']. - -

Changed views_plugin_style::render_grouping()

-The parameters as well as the structure of the methods return have changed. -The method now accepts a third optional parameter called "$group_rendered". -This parameter defines whether to use the rendered or the raw field value for grouping. -Intention for adding the parameter was that the grouping could have been acted -unexpected if the rendered field contained unique values e.g. by using drupal_html_id(). -
-
New return structure
-
-{grouping value} is the value affected by the new parameter. -
-  array (
-    {grouping value} => array(
-      'group' => {rendered_value of the grouping field},
-      'rows' => array({group rows}),
-    ),
-  );
-
-
-
Old return structure
-
-If the new parameter isn't explicitly set or its value is NULL the structure of the return will be the same as in D6! -
-  array (
-    {rendered_value of the grouping field} => array({group rows}),
-  );
-
-
-
diff --git a/help/api.html b/help/api.html deleted file mode 100644 index 6337e8be349..00000000000 --- a/help/api.html +++ /dev/null @@ -1,24 +0,0 @@ -Views allows modules to describe their tables relationships to each other, as well as fields, filters, sort criteria and arguments via hook_views_data(). Whenever Views deems it necessary, this hook is called, the data aggregated together and cached. hook_views_data_alter() may also be used to modify existing data, changing other module's handlers or adding handlers to other module's tables. - -Views also allows modules to create new display types, style types, row styles, argument default handlers and argument validators via hook_views_handlers() and hook_views_plugins(). - -These hooks are kept in a file named MODULENAME.views.inc. This file is automatically included upon need, so there is no need to try and include this in hook_init or any other method of including .inc files. This file should store hook_views_data, hook_views_data_alter(), hook_views_plugins(), hook_views_handlers(), as well as any other hooks and subsidiary data that will only be used by your module when Views is active. All handlers and plugins provided by your module should be in separate .inc files. - -There are two similar files, MODULENAME.views_default.inc and MODULENAME.views_convert.inc which contain default views and views 1 to views 2 convert helpers, respectively. - -

hook_views_api()

-In order for your files to be included, your module must first implement hook_views_api() in the main .module file. This module should return array of information. The following items may be returned: - -
-
api
-
This must appear; it should be the oldest API version that your module can work with. If Views is currently running an older version of the API, it will ignore your module's views integration. This is a good thing, as it will prevent code crashes, at the expense of your module's functionality disappearing. -
-You may find the current Views API version by calling views_api_version() which is implemented at the top of views.module. This version numbering starts at 2.0. Every time changes are made to the Views handlers and plugins or other aspects of the Views API, the number will tick up (by either .001, .01 .1 or 1 depending upon how major the changes are). Note that views_api_version() was introduced in Views 2.0-rc2 and may not exist prior to that version. You may use drupal_function_exists() to test to see if this function is there. -
-Often these versions are basically compatible with each other and Views won't care if your module implements 2.000, 2.001, 2.002, etc. Your module can request that it won't work with any version older than a given version, however. Views will determine, itself, if a newer version will work. -
-
path
-
If your *.views*.inc files are not in the same directory as the .module file, then return the full path here. You should probably use something like drupal_get_path('module', 'yourmodulename') . '/includepath'.
-
template path
-
A path where the module has stored it's views template files. When you have specificed this key views automatically uses the template files for the views. You can use the same naming conventions like for normal views template files.
-
diff --git a/help/argument.html b/help/argument.html deleted file mode 100644 index da67e353d59..00000000000 --- a/help/argument.html +++ /dev/null @@ -1,106 +0,0 @@ -Contextual Filters (known in previous versions of Views as "Arguments") are input. While they often come from the URL, they don't always. Don't be shocked when they don't. Each display type may have its own source for contextual filters. Block displays have no source of contextual filters at all; they cannot pull contextual filters from the URL, and often require use of PHP code as a default contextual filter. Various default values can be applied against contextual filters to use filters in a block view. See "Provide default value," under "When the filter value is NOT in the URL" below. - -In general, contextual filters are used to filter the view, and in that sense they have a very close relationship to filters. However, this isn't necessarily true for every contextual filter. Contextual filters can be used for any purpose, really; the extent of what the contextual filter does is up to the developer of the contextual filter. - -A typical use of an contextual filter might be to reduce a view to a single node, a single user, or nodes with a given taxonomy term. - -

When the filter value is NOT in the URL

- -
-
Display all results for the specified field
-
If this option is selected, the contextual filter is removed from the view as though it weren't there and all results will be displayed.
-
Provide default value
-
If no contextual filter is given, a default contextual filter can be selected. You may choose from a number of different default filter options. See "Default contextual filters" below.
-
Hide view
-
The view will remove itself entirely if the contextual filter is not present; for a block this means it simply won't appear. For page views the view will return a 404 and present a "Page not found" error.
-
Display a summary
-
The view will attempt to display a summary of contextual filters available, based upon the view, and provide links to the view with those contextual filters. Summaries have their own style handlers as well as options. The default summary style simply displays a list of contextual filters with a count of entries found per contextual filter. This special mode is a very powerful part of Views.
-
Display contents of "No results found"
-
If this option is selected, the value specified under "No results behavior" on the main view page will be displayed when there is no filter value in the URL.
-
- -An exception value can be set under the "Exceptions" menu. If this exception value is received, any filter value specified under "When the filter value is NOT in the URL" will be ignored. This is a literal value: if you enter the word "everything" here, the exception will apply only if the value "everything" is received. - -

Default contextual filters

- -The Default contextual filter selection is available only if the action to take is "Provide default value" under "When the filter value is NOT in the URL." When that option is selected, a new fieldset will appear that will allow you to choose default contextual filters. Views provides the following default selectors by default (but other modules may add more): - -
-
Content ID from URL
-
This will attempt to find a Node ID from the URL, and is primarily useful for the Node: ID contextual filter (though other contextual filters that use Node IDs, such as the CCK Node Reference contextual filter, will find it useful, too). For example, when visiting the path "node/1" or "node/1/edit" it will know that the "1" in that path is a node ID and use it.
-
Fixed value
-
You may directly enter what the contextual filter will be. This is not a variable, it will always be the same contextual filter.
-
PHP Code
-
Arbitrary php code inserted here will run whenever a contextual filter is not present in the URL.
-
Taxonomy term ID from URL
-
This default filter will attempt to return a taxonomy term from the current path. Selecting this option gives you the choice to also load default filters from terms.
-
User ID from URL
-
Like Node ID and Taxonomy term ID from URL, this will attempt to find a user ID from the path. It also includes an option to look for a node and use the node author as the user ID.
-
User ID from logged in user
-
If a user is currently logged in and accessing this view, their user ID will be returned as the contextual filter.
-
Current date
-
This option simply returns today's date.
-
Current node's creation time
-
Select this to return a node's creation time as a contextual filter.
-
Current node's update time
-
Not surprisingly, this filter returns the current node's update time
-
- -Please bear in mind that the selection of a default contextual filter happens only if a contextual filter is not provided. If you are using a display that has no contextual filter source, such as a block, the contextual filter value selected here will always be used. However, if using a display that reads contextual filters from the URL, the options selected here will only be applied if the URL did not contain an contextual filter. - -The "Skip default argument for view URL" option gives you the choice of ignoring the default argument totally. This is useful for certain applications, like the creation of feeds. - -

When the filter value IS in the URL or a default is provided

- -
-
Override title
-
Selecting this option will allow you to replace the default view title with a piece of arbitrary text. Argument substitutions in the form of %1, %2, etc. may be used here.
-
Override breadcrumb
-
This option will allow you to overwrite the view name in breadcrumbs. The same substitution values as in "Override title" may be used.
-
Specify validation criteria
-
Contextual filters can have validators, which are pluggable systems used to ensure that contextual filters fit within certain parameters. When a validator is chosen, it may provide some specific settings, including the action to take if an contextual filter is presented, but it fails to validate. These actions are generally the same as the default actions above, excluding the ability to provide another default filter. See "Contextual filter validation" below for a detailed description.
-
- -

Contextual filter validation

- -Note: If a view provides a menu option, such as a tab, the tab will not appear if the contextual filter does not validate. - -This sytem can have other validators plugged in; by default, Views provides: - -
-
Basic validation
-
This validator ensures that the contextual filter is present. A PHP NULL value (from eg. PHP default contextual filter code) will invalidate.
-
Content
-
This validator ensures that the contextual filter is a valid Node ID. You may select which node types the validator will accept.
-
Numeric
-
This validator ensures that the contextual filter is a valid number.
-
PHP Code
-
You may enter arbitrary PHP code here, similar to the "PHP code" option under "Provide default value" in "When the filter value is NOT in the URL" above, to determine if the contextual filter is valid or not.
-
Taxonomy term
-
Ensures that the contextual filter is a valid taxonomy term. This includes options to limit to specific vocabularies and can transform the contextual filter to the right type depending upon the actual contextual filter. Set the contextual filter value type option to the actual type of data that the contextual filter being used is expecting.
-
User
-
Ensures that the contextual filter refers to a valid user. If you select this validator, additional options are available to accept numeric user IDs, usernames or both, as well as to consider a user's role when filtering the view.
-
- -If you select the "Specify validation criteria" option to select a specific validator, you will have the option to select an action to take if the filter value does not validate. - -
-
Display all results for the specified field
-
Selecting this option will return all values if the filter value does not validate, similar to "Display all results for the specified field" under "When the filter value is not in the URL" above.
-
Hide View
-
Similar to "Hide view" under "When the filter value is NOT in the URL" above, if this option is selected and the selector does not validate, the view will hide itself. If the view is a block, nothing will appear. If it is a page, it will throw a 404 and present a "Page not found" error.
-
Return Summary
-
If you select this option and the filter does not validate, a summary of all values that are valid will be returned, as in the option of the same name under "When the filter value is NOT in the URL above."
-
Display contents of "No results found"
-
If this option is selected and the selector does not validate, the value specified under "No results behavior" on the main view page will be displayed.
-
- -

Adminstrative title

- -Located under the "More" group at the bottom of the "Contextual filters" menu, this option allows you to specify a custom name for the contextual filter. This may be particularly useful if you use the same contextual filter twice and you'd like to distinguish between the two filters. - -

Grouping of contextual filters

- -Even though contextual filters do not appear in the "and/or" user interface for sorting and grouping regular filters, contextual filters are always added to the first group of filters. Thus the order of the groups can cause the contextual filter to have entirely different effects on the results of a view that has contextual filters. Even though differences might not be apparent through the user interface. - -Multiple contextual filters are therefore always in the same "and/or" group of filters, and can not be placed in different groups. There is an effort to add this feature. diff --git a/help/basic-settings.html b/help/basic-settings.html deleted file mode 100644 index be2cadc1ea8..00000000000 --- a/help/basic-settings.html +++ /dev/null @@ -1,20 +0,0 @@ -You choose the name of the current display. -This title will be displayed with the view, wherever titles are normally displayed; i.e, as the page title, block title, etc. - -When you use have many items to display, you have the choice to display them in different variants. -
-
Display a specified number of items
-
Specify the number of items to display per page and an offset. The offset is the number of items to skip. For example, if this field is 3, the first 3 items will be skipped and not displayed. -
Display all items
-
All items will display, but you can choose an offset. The number of items to skip. For example, if this field is 3, the first 3 items will be skipped and not displayed.
-
Paged output, full pager
-
A Pager can be used to display items, with the possibility to select the next page and also the first and last page. When you have many items the query is very expensive. To avoid this, you can choose the mini pager. -You can also choose the number of items per page. If you enter 0, then there is no limit. Pagers also will respect an offset, if present. If multiple pagers are present on one page you may need to set this number to a higher value so as not to conflict within the ?page= array. Large values will add commas to your URLs, so avoid this if possible. Unless you're experiencing problems with pagers related to this view, you should leave this at 0. Enter the total number of pages to limit the number of values. When you leave the field empty all pages will show. -The Exposed options allow users to define their values in a exposed form when view is displayed. -You can choose "Expose items per page". With this option the user can determine how many items per page show in a view. Options for which label should display and what numberic options are also available. -Furthermore, you can choose "Expose Offset". When checked, users can determine how many items should be skipped at the beginning. You can define a label. -
-
Paged output, mini pager
-
The pager optiona are the same as for the "Paged output, full pager" but you have no possibility to jump to the last or first items.
-
-Normally, all views are created with unrestricted access. This means any site visitor can see the views. Please consider this when you make a view with a menu link and private data as output. You have by default two options: "Permission" and "Role". If you choose permission, you get a list of all permissions. Only users with the selected permission flag will be able to access this display. If you choose role, you get all roles as checkboxes. Only the checked roles will be able to access this display. Note that users with "access all views" can see any view, regardless of role. diff --git a/help/demo-video.html b/help/demo-video.html deleted file mode 100644 index 43c024033f0..00000000000 --- a/help/demo-video.html +++ /dev/null @@ -1,5 +0,0 @@ -

Here are some links to demonstration videos. It will get you started working with Views.

- -

Views 2 (Drupal 6) Demonstration Video - Drupal Handbook

- -

NodeOne's initial screencasts on the Views 3 UI. diff --git a/help/display-attachment.html b/help/display-attachment.html deleted file mode 100644 index 3dbdf88fa89..00000000000 --- a/help/display-attachment.html +++ /dev/null @@ -1 +0,0 @@ -Attachment displays are 'attached' to another display in the same view. When the display is visited, the attached display will also be rendered and may be placed before, after or both before and after the original display. Attachment displays are often useful for displaying an argument summary view along with a page display that accepts arguments. This can be used to provide a kind of glossary. diff --git a/help/display-block.html b/help/display-block.html deleted file mode 100644 index 9ac6d315acc..00000000000 --- a/help/display-block.html +++ /dev/null @@ -1,11 +0,0 @@ -Block displays will show up on your blocks administration page. Once a block display is created and saved, it can be enabled and positioned in your theme by visiting administer >> site building >> blocks and selecting it from the list. - -Blocks do not accept arguments from any source; the only way to get arguments to a block is to provide defaults to it, possibly via the PHP Code default setting. - -

diff --git a/help/display-default.html b/help/display-default.html deleted file mode 100644 index b619981d5fb..00000000000 --- a/help/display-default.html +++ /dev/null @@ -1,3 +0,0 @@ -The default display is primarily a display to store settings, and isn't actually used anywhere within the Views system. It is possible for external programs to use the default display, but if they do they will (hopefully) tell you which display they will be working with. The default display is also a convenient display to use to embed into your site using PHP snippets; this is useful, for example, in node content, but this is something that should generally only be done by administrators. - -In general, you probably want to add either a page display or a block display. diff --git a/help/display-feed.html b/help/display-feed.html deleted file mode 100644 index beddd008516..00000000000 --- a/help/display-feed.html +++ /dev/null @@ -1 +0,0 @@ -A feed display allows you to attach an RSS feed to a view. diff --git a/help/display-page.html b/help/display-page.html deleted file mode 100644 index 9ab84995669..00000000000 --- a/help/display-page.html +++ /dev/null @@ -1,7 +0,0 @@ -Page displays have a path and an optional menu component. Page displays will be the primary content for the page, meaning they will be displayed in the main content area when you visit the URL that corresponds to the path. - -Page displays take their arguments from the URL. You can embed arguments into the URL using %; in previous versions of Views, this was '$arg'. For example, 'node/%/foo' will accept URLs such as 'node/1/foo'. - -Please remember that using a % placeholder makes the argument required. If you wish to have an optional argument, simply omit the % from the path. I.e. using "page/%" as the path requires an argument and visiting 'http://www.example.com/page' will not trigger the view. - -If you intend to embed a view manually into another view, it is recommended that the page display not be used for embedding. Select a different display type to embed. diff --git a/help/display.html b/help/display.html deleted file mode 100644 index 48b2475c98c..00000000000 --- a/help/display.html +++ /dev/null @@ -1,13 +0,0 @@ -Displays tell Views where the output should go. By adding a display to a View, you can have your view appear as a page, or as a block, or even as an attachment to a different display on the view. - -Displays tell Views where the output should go. By adding a display to a View, you can have your view appear as a page, or as a block, or even as an attachment to a different display on the view. You must create at least one display in order to place a View on your site. - -Each display can have its own settings, but when created, a display will take all of its basic settings from the default display which all Views must have. For most settings, there is an override button that will override that single setting for the current display. Overridden settings will have a mark in the summary for that display. All 'default display settings' are shown in the other displays in 'italic'. When you override a setting, then it is shown 'normal'. - -Please keep in mind that when you are editing a setting on a display that is not overridden, then by default you are editing that for all displays. - -Overriding fields, arguments, sorts, filters and relationships, can only be done by overriding the entire group or none of them. To do this, click on the header for the filters or the rearrange button. Once you override, the display will then have its own copies of the fields/filters/etc and changes to the defaults will not be reflected on your display. - -With the Reorder button you can organize the order of your displays. -With the Analysis button the system checks the view and may give you suggestions if something is wrong. -You can clone a display by using the link in the header of the display. diff --git a/help/drush.html b/help/drush.html deleted file mode 100644 index 689ff3391ec..00000000000 --- a/help/drush.html +++ /dev/null @@ -1,13 +0,0 @@ -There are some Drush commands available for Views, initially added in Drush command to revert views: - - - -Examples: -drush views-revert -[prompts the user with a list of overridden views to choose from, or to revert all] - -drush views-revert archive myview2 -[reverts the two specified views] diff --git a/help/embed.html b/help/embed.html deleted file mode 100644 index e39fbf5cd23..00000000000 --- a/help/embed.html +++ /dev/null @@ -1,24 +0,0 @@ -You can easily embed the results of a view into other parts of your site; -either with code as a module, or in nodes or blocks as snippets. The -easiest way is to use the function views_embed_view(): - -/** - * Embed a view using a PHP snippet. - * - * This function is meant to be called from PHP snippets, should one wish to - * embed a view in a node or something. It's meant to provide the simplest - * solution and doesn't really offer a lot of options, but breaking the function - * apart is pretty easy, and this provides a worthwhile guide to doing so. - * - * @param $name - * The name of the view to embed. - * @param $display_id - * The display id to embed. If unsure, use 'default', as it will always be - * valid. But things like 'page' or 'block' should work here. - * @param ... - * Any additional parameters will be passed as arguments. - */ -function views_embed_view($name, $display_id = 'default') { - - -To figure out the id of a display, hover your mouse over the tab to select that display. Everything after the '#views-tab-' is the id of that display. This ID is guaranteed never to change unless you delete the display and create a new one. diff --git a/help/empty-text.html b/help/empty-text.html deleted file mode 100644 index 0a085938ceb..00000000000 --- a/help/empty-text.html +++ /dev/null @@ -1,3 +0,0 @@ -The Emtpy Text content will be displayed when you choose the option Display empty text under the Arguments labelled Action to take if argument is not present. - -By default you can choose one or more text areas. diff --git a/help/example-author-block.html b/help/example-author-block.html deleted file mode 100644 index 41ff071dd82..00000000000 --- a/help/example-author-block.html +++ /dev/null @@ -1,77 +0,0 @@ -

In this example you will create a context-sensitive block that shows the titles of recent blog entries by an author when viewing one of their posts. This will demonstrate using Views arguments to dynamically filter a view's contents at display time.

- -

Before working through this example, enable the Blog module and populate some entries from a few different users.

- -

Creating the View

-

The first step is creating a view for our recent blog entries block. Because the block will show the titles of blog entries, this view is considered a "Node" type. Go to add new view, enter the following properties, and click Next:

- -
-
View name
-
recent_blog_entries
-
View description
-
List of recent blog entries for a given author.
-
View tag
-
blog
-
View type
-
Node
-
- -

Generating a list of blog entries

-

It will be much easier to see the view progress if we can see it doing something. In this section, we will create a basic view displaying blog entry titles.

- -
    -
  1. In the third column, locate the Fields area. Generally speaking, fields are the pieces of information that you want to display in the view (in this case, node title). Click the + icon to add a field.
  2. -
  3. Scroll down to Defaults: Add fields, below the settings table. A large selection of fields will be available.
  4. -
  5. In the Groups drop-down menu, select Node. This will limit the list to only the default fields exposed by Node module.
  6. -
  7. Scroll down the list, select the Node: Title field, and click Add.
  8. -
  9. You will now be presented with settings for the Node: Title field. Delete the label from the Label field, so that each individual node title is not prefixed with the word "Title." Additionally, check the Link this field to its node box so that visitors who see an interesting title can click directly on it to read the blog entry to which it belongs.
  10. -
  11. When finished, click Update. If you scroll down to the Live Preview section, you should now see a list of several node titles; however both blog entries and other node types will be in the list. Let's fix that.
  12. -
  13. In the fourth column, locate the Filters area. Filters limit the results displayed in the view, and we can use this to our advantage here by showing node titles only from blog entries and not every type of node. Click the + icon to add a filter.
  14. -
  15. As before, scroll down to the Defaults: Add filters section, select Node from the Groups select box to limit the list of options to only those exposed by Node module.
  16. -
  17. Scroll down and select the Node: Type field and click Add. In the settings page that appears, leave Operator as Is one of and select Blog entry under Node type. Click Update when finished.
  18. -
  19. Now, by scrolling down to Live preview, you'll see that the list only shows blog entries.
  20. -
- -

Adding context with arguments

-

While filters are very useful for limiting the results of a view when the condition is always consistent (for example, a view of blog entry nodes should always be filtered by the blog entry type), something filters can't do is smart decision-making based on the page context. In our case, we want the view to display a different list of blog entries when looking at a post by user 'admin' than we do when looking at a post by user 'member', and filters won't be able to help.

- -

Luckily, there's another way to filter a view's content: arguments. Through arguments, Views are able to obtain additional context (typically via dynamic URLs with IDs in them) and can take this context into consideration when displaying the view.

- -

Let's walk through adding and configuring an argument to our view so that we can change its contents based on post author.

- -
    -
  1. In the third column, locate the Arguments area. Click the + icon to add an argument.
  2. -
  3. Because we are basing the view around content authors, this time under Groups select User. Check User: Uid and click Add.
  4. -
  5. The Defaults: Configure Argument User: Uid settings page has a lot going on, but only a few things that need our attention.
  6. -
  7. The Title field here, unlike the Title field under Basic Settings, can be based upon the context that the view is being displayed in. Change the title to 'Recent entries by %1.' %1 will later be expanded to the user's name (based on the User: Uid argument) when the view is displayed.
  8. -
  9. Under Action to take if argument is not present, there are a variety of options, ranging from displaying a 404 or a 403 page to simply displaying all values in the view. In our case, if an argument isn't specified (which it won't be, since this view will be displayed in a sidebar block, not as a page with its own URL), we want to give it a default one to act on. Select Provide default argument.
  10. -
  11. Assuming JavaScript is enabled in your browser, you should now get another selection for Default argument type. Select User ID from URL, which will then provide a new option, Also look for a node and use the node author. Select it. This will cause Views to first see if it can figure out a user ID from the current URL (for example, user/1). If it can't, it will instead check to see if the current page is a node page (such as node/42) and, if so, take the user ID from the node's author field instead.
  12. -
  13. Validator options provide a useful way to control what kind of arguments your view will accept. Select User as the Validator. By default, changing this setting will check the incoming argument and ensure it's a valid user ID; if not, the view will be hidden from the page.
  14. -
  15. Once you have changed the argument's title, default argument, and validator options, click Update to save your changes.
  16. -
  17. You'll notice that now the Live preview no longer shows anything. Did we just break the view? Fortunately, no. It's merely abiding by our wishes to hide itself if there is no valid user ID given to it. Try entering a '1' in the Arguments box and clicking Preview. You should now see a list of only user 1's blog entries.
  18. -
- -

Creating the block

-

So the live preview is now showing basically what we want. There's just one problem: we have no way to stick what we've done so far into a sidebar block! Let's fix that by adding a new Display.

- -
    -
  1. In the first column, under Defaults, there is a select box containing entries such as Page, Feed, and, yes, Block! Select Block and click Add display.
  2. -
  3. There's not much else to do here as far as Views is concerned. Under Block settings, click the None link next to Admin and fill in a description for the block in the administrative interface, such as: 'Recent blog entries by author.' and click Update.
  4. -
  5. Save your work by clicking the Save button at the bottom of the Views interface. You should receive a message that the view has been saved.
  6. -
  7. Next, navigate to the blocks interface and drag the 'Recent blog entries by author' block to the right sidebar region (or similar) and click Save blocks.
  8. -
  9. You'll notice this appeared to do nothing. No block shows in the sidebar. But remember, we are looking at an adminitrative page; we are not looking at a page that would provide a user ID context. Navigate to the main blog listing and click on an entry there. You should now see a sidebar block, titled something like "Recent entries by admin," with a list of blog entries beneath it.
  10. -
- -

Finishing touches

-

There are still a few remaining things to do before our view is complete. For example, we said that the block was to show recent blog entries, but instead it's showing them in the order they were entered, with oldest on top. Additionally, even unpublished entries are showing in the list currently.

- -
    -
  1. Return to the recent_blog_entries view edit page.
  2. -
  3. Add an additional filter by clicking the + icon in the Filters section in the fourth column.
  4. -
  5. Change Groups to Node and select Node: Published. Click Add.
  6. -
  7. Under the Published selection, choose Yes and click Update.
  8. -
  9. To handle sorting, locate the Sort criteria area, just above filters, and click the + icon there.
  10. -
  11. Under Groups, again select Node. From the list of options, check Node: Post date and click Add.
  12. -
  13. In the settings page, change Sort order to Descending. This will place the newer posts on top of the older ones. Click Update when finished.
  14. -
  15. Finally, Save the view for your new settings to take effect.
  16. -
diff --git a/help/example-filter-by-current-user.html b/help/example-filter-by-current-user.html deleted file mode 100644 index b7fdd05d004..00000000000 --- a/help/example-filter-by-current-user.html +++ /dev/null @@ -1,46 +0,0 @@ -

In this example you will create a page that displays a list of the content authored by the current logged-in user. This will demonstrate using Views filters and relationships to dynamically filter the view's contents at display time.

- -

For this example, we are assuming you have a content type "Blog Post".

- -

Creating the View

-

The first step is creating a view for our content list page. Because the page will show the titles of content, this view is considered a "Content" type. Go to add new view, enter the following properties, and click Next:

- -
-
View name
-
content_by_current_user
-
Description
-
List of content authored by the current user.
-
- -

Choose Show Content of type Blog Post. You can choose any way you wish to sort the content.

- -

Creating the page

-

Tick the box next to Create a page. Enter a page title and a path. For our purposes here, the default settings for the rest of this page are sufficient.

- -

Click on Continue & edit.

- -

Creating the relationship

-

In order to have access to the author of the content, it is important to create a relationship between the current content type, and users.

- -

Under Advanced in the right culumn, select add next to Relationships.

-

Select Content: Author and click on Add and configure relationships. Leave the settings as they are and click on Apply (all displays).

- -

You now have access to the user data related to the content you are viewing.

- -

Filtering the view

-

Now you need to filter the view to display only content authored by the current user. This data is now available for the content because you have created the relationship in the step above.

- -

Next to Filter criteria click on add to add a new filter to your view.

- -

Filter the list of fields by selecting User next to Filter at the top. You now have more fields than before due to the relationship you created.

- -

Select User: Current from the list and click on Add and configure filter criteria.

- -

Since this field is only visible due to the relationship you created, author will already be selected under Relationship. This shows that the relationship you created is being used for the filter field.

-

Select Yes under Is the logged in user, and click on Apply (all displays).

- -

If you have authored content of the type Blog Post, you should now see a list of those posts under the preview section at the bottom.

- -

Saving & testing the view

-

Click on Save to save the view.

-

You can test the view by going to the path you entered in the first part of this example.

diff --git a/help/example-recent-stories.html b/help/example-recent-stories.html deleted file mode 100644 index 7e21324d3df..00000000000 --- a/help/example-recent-stories.html +++ /dev/null @@ -1,57 +0,0 @@ -In this example you will create a list of nodes of the content type "story", to be shown in a block. Through this step-by-step process, you will become familiar with some basic steps in creating a view, and familiarize yourself with the Views User Interface. - -
    -
  1. Creating a new view

    -

    Go to add new view. Give your new view the name 'recent_stories', description 'Recent Stories', tag 'story', type 'Node' and click Next.

  2. -
  3. About the interface

    -

    You have been brought to Views User Interface. As you start, you are editing the "Default" options for the view. In the 1st column on the left you can see the drop-down menu offers 'block', for example, to select settings specific only to block views. In the remaining columns, you will be able to add or change options by clicking on links or icons. These options will then appear below this main area. Most likely, you will need to scroll a bit to see the options appear.

  4. -
  5. Selecting the fields to display

    -
      -
    1. In 3rd column locate the Fields options. Click the + icon to add fields.
    2. -
    3. Scroll down to Defaults: Add fields. In the Groups drop-down menu select 'Node', then check the following two fields: Node: Post date, Node: Title. Then click Add.
    4. -
    5. You will be taken through the fields you added one at a time. Make the changes specified below. -
        -
      • For the Post date field: Delete the 'Post date' label. Change the Date format to Custom, and the Custom date format to 'F j, Y, g:i a' (do not type the single quotes; for the meaning of these letter codes, click on the PHP docs link under that box to arrive at the explanation). Click Update.
      • -
      • For the Title field: Delete the 'Title' label. Select Link this field to its node. Click Update.
      • -
      -
    6. -
    7. Scroll back up to Fields and click the ↑↓ icon to rearrange fields.
    8. -
    9. Drag the four-sided arrow next to Node: Title so that it appears above Node: Post date. Click Update to save the new field order.
    10. -
    -
  6. -
  7. Filtering to story nodes only

    -
      -
    1. Click the + icon next to Filters.
    2. -
    3. In the Groups drop-down menu select 'Node', then check the Node: Published and Node: Type filters, and click Add.
    4. -
    5. Select the Published checkbox. Click Update
    6. -
    7. Select Is one of and check Story in the Node Type field. Click Update.
    8. -
    -
  8. -
  9. Sorting to show most recent first

    -
      -
    1. Scroll up to Sort criteria and click the + icon.
    2. -
    3. In the Groups drop-down menu below, select 'Node', then check Node: Post date, and click Add. Alternatively, you may instead check Node: Last comment time, or Node: Updated/commented date, or Node: Updated date.
    4. -
    5. Select Descending Sort order. Click Update.
    6. -
    -
  10. -
  11. Refining the basic settings

    - -
  12. -
  13. Adding a block display for custom options

    -
      -
    1. In the dropdown on the left, ensure that Block is selected, and click Add Display.
    2. -
    3. Under Block settings, click the None link next to the Admin setting. Change Block: Block admin description to 'Recent Stories'.
    4. -
    -
  14. -
  15. Saving the view

    -

    Click Save to save your work.

  16. -
  17. Instructing Drupal to show the block

    -

    Finally, you should tell Drupal to show this block. Configure your block by going to admin/structure/block. Locate the block in the list: it is labeled Recent Stories. Place this block in a region and click Save. You may click Configure to set a different title, to determine which roles can view the block, and on which pages it appears; If you want your block on the front page only, enter '<front>'.

  18. -
diff --git a/help/example-slideshow-thumb-pager.html b/help/example-slideshow-thumb-pager.html deleted file mode 100644 index 1c83984d92e..00000000000 --- a/help/example-slideshow-thumb-pager.html +++ /dev/null @@ -1,54 +0,0 @@ -

In this example you will create a views block that displays images in a slideshow using thumbnails of the images as a pager underneath the slideshow. This will demonstrate using Views Slideshow and Image Styles to display images.

- -

For this example, we are going to display a single image from each content item of the type "Photos", which we assume you have already set up with an image field. We are also assuming that Views Slideshow and at least one plugin is installed and activated.

- -

Creating the image styles

- -

The first step is creating the right image styles to display the images from the node. We will create one for the slideshow image, and one for the pagers. Go to Image Styles and create the following two styles:

- -
-
Style name
-
slideshow_image
-
Effects
-
Scale and crop: 600px wide, 400px high
-
-
-
Style name
-
slideshow_thumbnail
-
Effects
-
Scale and crop: 30px wide, 20px high
-
- -

Creating the View and block

- -

The next step is creating a view for the slideshow. Because the block will show the images in content, this view is considered a "Content" view. Go to add new view, enter the following properties, and click Next:

-
-
View name
-
Photo Slideshow
-
Description
-
Slideshow of images from Photos.
-
- -

Choose Show Content of type Photos. You can choose any way you wish to sort the content.

-

Untick the box next to Create a page and tick the box next to Create a block. Enter a block title and choose Slideshow from the Display format select box. Select fields from the other select box. Leave the remaining settings as they are.

-

Click on Continue & edit.

- -

Editing the view settings

- -

Turn off the pager by clicking on Display a specified number of items in the middle column and selecting Display all items in the next screen, and applying the settings.

-

Enter a Block name by clicking on None at the top of the middle column.

-

Next, remove the Content: Title field from the fields list in the left column by blicking on rearrage under the arrow.

-

Next we have to add the thumbnail image field. Click on Add under the fields section and select your image field from the list. In the next screen, turn off the label, select Exclude from display and select slideshow_thumbnail from the Image Style select box. Under MORE, enter Thumbnail under Administrative Title.

-

Click on Apply (all displays).

-

Now we have to add the image field to display in the slideshow. Clcik on Add under the fields section and select your image field from the list. In the next screen, turn off the label and select slideshow_image from the Image Style select box. Under MORE, enter Display Image under Administrative Title.

-

Click on Apply (all displays).

- -

Editing the slideshow settings

- -

Click on Settings next to Format: Slideshow in the first column. In the screen that opens we can choose the options for our slideshow.

-

For the purpose of this example, we will only add the thumbnails as a pager, and leave the remaining slideshow settings as they are. Select the tick box next to Pager under Bottom Widgets. Select Fields from the Pager Type select box. Select the tick box next to Thumbnail.

-

Click on Apply (all displays).

- -

Saving & testing the view

-

Click on Save to save the view.

-

You can test the view by adding the block you have created to your theme.

diff --git a/help/example-user-feed.html b/help/example-user-feed.html deleted file mode 100644 index 64b2b42ac7b..00000000000 --- a/help/example-user-feed.html +++ /dev/null @@ -1,73 +0,0 @@ -

In this example you will create a Feed display to show nodes by individual users, dynamically selected through the URL. You will become familiar with the Views 2 interface, as well as learn how to use an argument to pull in a user name and use it in a dynamically created path.

-

A feed is a data format that places your site's content into a file that can be read and displayed by news reader programs. When visiting a site, you may notice a small RSS transmission icon, whereby clicking on it, you can subscribe to the site's most recent content. This makes it easier for your visitors to keep up to date with your website. You can also use this format to aggregate information into other sites. For more information, please watch a video from Common Craft about RSS in plain English.

-

Note, Drupal automatically creates a feed for your website, but you may want to create feeds with specific information. In this case, a list per user.

-
    -
  1. -

    Creating a new view

    -
      -
    1. Go to add new view. Give it the name 'user_feed', description 'A feed of user nodes.', tag 'users', type 'Node' and click Next.
    2. -
    -
  2. -
  3. About the Interface. You have been brought to the Views User Interface. As you start, you are editing the "Default" options for the view. In the 1st column on the left- you can see the pull-down menu offers 'Feed', for example, to select settings specific only to RSS views. In the remaining columns, you will be able to add or change options by clicking on links or icons. These options appear below this main area. Most likely, you will need to scroll to see the options appear. As you make changes, these options will appear in bold until you save your view.
  4. -
  5. -

    Change default display

    -
      -
    1. Under Basic Settings in the 2nd column, click Row style: Fields
    2. -
    3. A menu loads below, Defaults: How should each row in this view be styled, check the Node option, and click Update.
    4. -
    5. This loads another options menu, Defaults: Row style options click Update.
    6. -
    -
  6. -
  7. -

    Create the RSS view

    -
      -
    1. In the 1st column, select 'Feed' in the drop-down menu, and click Add Display.
    2. -
    3. Under Basic Settings in the 2nd column, click Row style:Missing style plugin
    4. -
    5. Note, options appear below the Views Interface, you may need to scroll to see Feed: How should each row in this view be styled
      - tick Node, then Update
    6. -
    7. This loads the next options menu- Display type: select "Use default RSS settings", click Update.
    8. -
    -
  8. -
  9. -

    Set the path for accessing your feed

    -
      -
    1. In the 2nd column under Feed settings, click Path: None
    2. -
    3. In options below Feed: The menu path or URL of this view enter in the path with an argument feeds/%/rss.xml
    4. -
    5. Click Update
    6. -
    -
  10. -
  11. -

    Set up your arguments to say which user's nodes to display

    -
      -
    1. To the right of Arguments, click the + sign to add and argument
    2. -
    3. In the Feed: Add arguments menu that loads below, select User in the pull-down menu
    4. -
    5. Check the box User: Name, click Add
    6. -
    7. Scroll down to options to find Case in path: select Lower case
    8. -
    9. Check the box Transform spaces to dashes in URL
    10. -
    11. Click Update default display
    12. -
    -
  12. -
  13. -

    Sort to show most recent at top of feed

    -
      -
    1. Scroll up to Sort criteria in the right most column and click the + icon.
    2. -
    3. In the Groups drop-down menu below, select 'Node', then check Node: Post date, and click Add.
    4. -
    5. Select Descending Sort order. Click Update.
    6. -
    -
  14. -
  15. -

    Set filters to hide unpublished entries

    -
      -
    1. Click the + icon next to Filters. In the options below, select Node under Groups drop-down menu, choose the Node: Published filter, and click Add.
    2. -
    3. Check the box Published. Click Update default display
    4. -
    -
  16. -
  17. -

    Test

    -
      -
    1. Click Save
    2. -
    3. Under Live preview type in the name of a user, in lowercase, replacing spaces with dashes, click Preview.
    4. -
    5. You should test and find your feeds at URLs like http://yoursite.com/feeds/user-name/rss.xml
    6. -
    7. You can use this path for aggregating on another site. You can also attach the RSS feed to another display of view to make the feed link appear on that display.
    8. -
    -
  18. -
diff --git a/help/example-users-by-role.html b/help/example-users-by-role.html deleted file mode 100644 index f5228be3ba8..00000000000 --- a/help/example-users-by-role.html +++ /dev/null @@ -1,47 +0,0 @@ -In this example you will create a page view listing users on your site. Through this step-by-step process, you will become familiar with some basic steps in creating a view, and familiarize yourself with the Views User Interface. - -
    -
  1. Creating a new view

    -

    Go to add new view. Give your new view the name 'user_list', description 'A simple user listing.', tag 'users', type 'User' and click Next.

  2. -
  3. About the Interface

    -

    You have been brought to the Views User Interface. As you start, you are editing the "Default" options for the view. In the 1st column on the left you can see the drop-down menu offers 'block', for example, to select settings specific only to block views. In the remaining columns, you will be able to add or change options by clicking on links or icons. These options will then appear below this main area. Most likely, you will need to scroll to see the options appear. As you make changes, these options will appear in bold until you save your view.

  4. -
  5. Creating a page display; choosing a URL and creating a menu link

    -
      -
    1. In the 1st column, ensure that 'Page' is selected in the drop-down menu, and click Add Display.
    2. -
    3. Next we'll define the path for this page. A page must have a path, and we define it early so that Views doesn't warn us "Display Page uses path but path is undefined." Locate the Page settings in the 2nd column, and click the None link next to the Path setting. In the options editing area that appears below, set the path to 'user_list' (or something Implement you prefer) and click Update.
    4. -
    5. Next to Menu setting, Click the No menu link. In the options which appear below, select Normal menu entry, and set the title to 'User list' and click Update.
    6. -
    7. Scroll up to Basic settings, in that same 2nd column, and click the No link next to Use pager. Below, in the options, select Full pager and click Update default display.
    8. -
    -
  6. -
  7. Selecting the fields to display

    -
      -
    1. In 3rd column locate the Fields options. Click the + icon to add fields.
    2. -
    3. Scroll down to Defaults: Add fields. In the Groups drop-down menu select 'User', then check the following fields: User: Created date, User: Delete link, User: Edit link, User: Last access, User: Name and User: Picture. Then click Add.
    4. -
    5. You will be taken through the fields you added one at a time. Click Update default display to go to each next field. Leave the default options on all fields except Delete link; change that field's label to 'Operations'.
    6. -
    7. Scroll back up to Fields and click the ↑↓ icon to rearrange fields. Down below, drag the Name field, by dragging its four-sided arrow, to the top. Drag the Delete link (Operations) field to the bottom, and the Edit link field just above it. Then click Update.
    8. -
    -
  8. -
  9. Seeing what we've done so far

    -

    At this point, you have done enough to create a valid view. If you scroll down, you will see a preview of your view. If it doesn't show already, click the Preview button; but generally this display updates automatically whenever you finish working in one of the mini forms.

  10. -
  11. Styling the view as a table; combining related fields into columns

    -
      -
    1. Under Basic settings, in the 1st column, click the Unformatted link next to the Style setting. In the options below, under Page: How should this view be styled, choose Table and click Update default display.
    2. -
    3. You will be taken to a Page: Style options form to edit the table settings. Locate our Edit link field in this mini form, and notice the Column drop-down. Change this drop-down to show Operations. In the Separator column next to the Operations field, type ' | ' (note the spaces around the | symbol). Check all of the Sortable checkboxes, and set Default sort to Name. When finished, click Update default display.
    4. -
    -
  12. -
  13. Filtering the user list to exclude unwanted entries

    -
      -
    1. Click the + icon next to Filters.
    2. -
    3. In the Groups drop-down menu select 'User', then check the User: Name filter, and click Add.
    4. -
    5. Select Is not one of and enter 'Anonymous' in the Usernames box. Click Update default display.
    6. -
    -
  14. -
  15. Adding an argument to list users by role dynamically

    -
      -
    1. Scroll up to Arguments, and click its + icon.
    2. -
    3. Check the User: Roles argument, and click Add. Set the title to '%1' (don't type the quotes), and under Action to take if argument is not present select Summary, sorted ascending. Leave the other settings as they are. Click Update default display, and click Update through the prompts that follow to accept their default values.
    4. -
    -
  16. -
  17. Saving the view

    -

    Finally, click the Save button to save your work. At the very top, click View "Page" to go to your new view!

  18. -
diff --git a/help/exposed-form.html b/help/exposed-form.html deleted file mode 100644 index ca06e9fba85..00000000000 --- a/help/exposed-form.html +++ /dev/null @@ -1,24 +0,0 @@ -This is used when you want to position the exposed form in the sidebar or anywhere else, but not with the view. Instead, a block will be made available to the Drupal block administration system, and the exposed form will appear there. Note that this block must be enabled manually, Views will not enable it for you. -To do this select "Exposed form in block: Yes" and choose one option from "Exposed form style". -
-
Basic
-
When you expose a form and the view is loaded, no filter is selected and all items will displayed.
-
Input required
-
When you expose a form and the view is loaded, only the filter settings are shown. After you select one filter and hit the apply button, the items willi be shown.
-
- -You have several options to customize the appearance of the exposed forms: -
-
Submit button text
-
Text to display in the submit button of the exposed form.
-
Include reset button
-
If checked the exposed form will provide a button to reset all the applied exposed filters
-
Reset button label
-
Text to display in the reset button of the exposed form.
-
Exposed sorts label
-
Text to display as the label of the exposed sort select box.
-
Ascending
-
Text to use when exposed sort is ordered ascending.
-
Descending
-
Text to use when exposed sort is ordered descending.
-
diff --git a/help/field.html b/help/field.html deleted file mode 100644 index e9d9e609c93..00000000000 --- a/help/field.html +++ /dev/null @@ -1,27 +0,0 @@ -Fields are the individual pieces of data being displayed. Adding the fields Node: Title, Node: Type, and Node: Post date to a node view, for example, includes the title, content type and creation date in the displayed results). - -Fields may not appear on every display, because not all style plugins actually use fields. For example, the 'node' row plugin simply displays the node through Drupal's normal mechanisms, and fields are not involved. -For the most part, the field settings should be self explanatory. Fields will appear in the order that they are arranged in, and they will usually appear with the label they are given. - -If you add new cck fields you will find them under the Group "Content". Search for the field name. With new modules the list of groups will grow. Modules can add new items with the hook_views_data() hook. - -If you do not find a field, consider whether or not you need a Relationship. - -You can override the entire field section - see here for more information. - -When a field is added, the "Configure field" modal opens. It has a dropdown at the top that lets you choose what display this field configuration is valid for (ie, this display, or all displays.) - -You start by configuring three checkboxes: - - -Style settings give you several options for wrapping an HTML element around a field; title, for example, can be wrapped in an H1-H6, a SPAN, DIV, etc. It can also be given a particular identifying CSS class of its own here. You can do the same with the label or do them both at the same time. This is part of the Semantic Views integration. Alternately, you can leave the default Views classes to identify the field and content. - -If you have No Results, you can customize that in this modal also. You have the options to count 0 as empty, or to hide the entire field if it's empty. - -Next up is the Rewrite results: all the options you need to rewrite the output of the field with tokens, custom text, a link, etc. If your field is output as a link using the Output this field as a link option, you can include the "Alt" text for a link hover in a Title attribute. This is important for accessibility. - -The last section is the administrative title, which just gives you a place to give the field a special name on the admin screen in case you have more than one copy. diff --git a/help/filter.html b/help/filter.html deleted file mode 100644 index cb84f8a8a66..00000000000 --- a/help/filter.html +++ /dev/null @@ -1,35 +0,0 @@ -Filters are used to reduce the data set that Views provides. That is to say, without any filters applied, Views will return all of your content. You don't want that, so at least some filters must be used. - -Some very commonly used filters: - - -The above list is only a tiny fraction of the filters available in Views, referenced here to give an idea of the kinds of tasks filters can accomplish. When you do not find a filter type, you may need to choose a Relationship before the expected filter will show, or to install a new module that contains the requested filter. - -When you click the Rearrange Icon you can first rearrange your filters, easily delete filters and select an operator: "AND" or "Or". By default the "AND" operator is selcted. At the lower right of the window is the new button "Add new group". When you click on it, you can drag and drop an individual filter to the new group "Group 1". For this new group and the default group you can select the "Group operator": "And" or "Or". To remove a group, remove all filters and click the "Remove group 1" button. - -When you want that the user to select their own filter, you can expose the filter. A selection box will show for the user and they will be able to select one item. After that the view will reload and only the selected item will be displayed. You can also choose to expose the selection to a block, see here. - -For exposed filters, you can create a grouped filter. When filters are in a group, each item of the group represents a set of operators and values. The following table illustrates how this feature works. The values of the first column of the table are displayed as options of a single select box: - - - - - - - - - - -
What the user seeWhat views does
Is lower than 10Operator: Is Lower than. Value: 10
Is between 10 and 20Operator: Is between. Value: 10 and 20
Is greater than 20Operator: Is Greater. Value: 20
- -Please note: When using grouped filters with the option: 'Enable to allow users to select multiple items' checked, you probably may want to to place the filter in a separated group and define the operator of the group as 'OR'. This may be neccesary because in order to use multiple times the same filter, all options have to be applied using the OR operator, if not, probably you will get nothing listed since usually items in a group are mutually exclusive. - -Taxonomy filters have been significantly altered in Views 7.x-3.x. D7 significantly re-organized taxonomy, there was a lot of duplicate taxonomy related fields and filters. Some of them were removed to try and reduce confusion between them. Implicit relationships to taxonomy have been removed, in favor of explicit relationships. If the filters you can find don't do what you need, try adding either the related taxonomy terms relationship, or a relationship on the specific taxonomy field. That will give you the term specific filters. - -You can override the complete filter section - see here for more information. diff --git a/help/get-total-rows.html b/help/get-total-rows.html deleted file mode 100644 index 623b35fe72c..00000000000 --- a/help/get-total-rows.html +++ /dev/null @@ -1,16 +0,0 @@ -The flag $view->get_total_rows is used to force the query of the view to calculate the total number of results of the set. - -This parameter is TRUE by default in views that get all the results (no limit) or those which have a pager, so you always have the $view->total_rows variable populated in those cases. -But when you have a view that gets only a given number of results and no pager, the count query is not executed by default so you have to force it, i.e. in the hook_views_pre_execute so you have $view->total_rows populated for later use. - -This code will help you do that. - -
-<?php
-function my_module_views_pre_execute(&$view) {
-  if ($view->name == 'my_view' && $view->current_display == 'my_display') {
-    $view->get_total_rows = TRUE;
-  }
-}
-?>
-
diff --git a/help/getting-started.html b/help/getting-started.html deleted file mode 100644 index e05af40b980..00000000000 --- a/help/getting-started.html +++ /dev/null @@ -1,23 +0,0 @@ -For those new to Views, it can be a complex system that appears totally overwhelming. The good news is that the UI is designed to compartmentalize everything; this means that for the most part, you can ignore the parts you're not interested in. Start small and build your way up. - -Because of this, the edit UI can seem overwhelming at first, but there are really just a few things you have to know. The rest you can find through exploration. The Views Edit UI image, below, gives an overview of what you'll find on the edit UI. - -
- -The Views Edit UI -
- -Notes: -1) Every view has a number of displays which represent where output will be placed. If you're familiar with the original Views 1, you could set a view to be a 'page', with a URL (path), or a block that could show up in a sidebar. With Views 2, you can add as many displays as you like. In addition, you have the default display which contains the basic settings, but doesn't actually show up anywhere. - -2) When you click on the link for an item, a form will open up. For browsers with smaller resolutions, you may have to scroll down a little to see this form. If a form is open, the item its attached to will be highlighted. - -3) Overrides mean that a particular display is not using default settings. When you create a new display, many of its settings will start off using default values. This will be indicated by italics and a lighter color. If you change these values without first overriding them, you will change the default value for all displays that use them. - -4) Some items, particularly styles, have additional settings. Ordinarily when you update a style, if it has additional settings you will automatically see that form next. Often, you will need to go directly to those settings. - -5) You can safely leave a view page to go and do other things. If you come back, the view will still be there, stored in a cache. Keep in mind, however, that while you do this, that view is locked, meaning another user cannot edit this view without breaking the lock. Breaking the lock will discard your changes. - -6) Don't forget permissions. Views installs with two default permissions. Users with access all views permissions will have access to all views. Users with administer views permissions will be able to edit and change views. If you are trying to restrict access based on role, make sure that the role does not have access all views checked. - -It helps to have something particular in mind that you want to accomplish when using Views. Here are a couple of ideas and a brief sketch of how to accomplish what you want. diff --git a/help/group-by.html b/help/group-by.html deleted file mode 100644 index 871fb5368c9..00000000000 --- a/help/group-by.html +++ /dev/null @@ -1,17 +0,0 @@ -This is another major new feature for Views that has been long requested. It incorporates another module that has seen a relatively wide amount of use: views_groupby. This feature provides multiple new options for manipulating data. First, it includes the important “group” SQL functionality, and then enables aggregation functions for Views, such as SUM and COUNT. -
- -Where to set aggregation to get group settings -
- -Grouping is available for sorts and filters. To use grouping, “Use grouping” must be enabled on a per-view basis in the Views UI. This is toggled in the Advanced settings box by clicking the link next to “Use grouping”. Once you activate this checkbox (be sure to read the notes in the UI!), functions for aggregating particular fields will become available. The gear icon that should be familiar to users with any amount of Views experience will now appear next to any sorted or filtered field with aggregation capabilities. Choosing that icon will open up the configuration for the aggregation functions. As an example, this could be used to count things like number of posts in a day, or number of published posts. This could also be used to sum the values of a row, instead of everything in the view. - -Setting only the "Use aggregation" turned on itself does nothing. It only gives the possibility to set Aggregation types. - -
- -Different aggregation possibilities -
- - -It should be noted that modules that are providing data to Views are responsible for noting whether a field supports aggregation or not; modules that do not provide this information may not have all of their fields available to Views if this data is not in place. diff --git a/help/header.html b/help/header.html deleted file mode 100644 index bc31b490e1d..00000000000 --- a/help/header.html +++ /dev/null @@ -1,3 +0,0 @@ -In this section you can choose one or more areas, by default a text area, which will display above the view output. - -You can override the complete header section - see here for more information. diff --git a/help/images/node-term_node-term_data-large.png b/help/images/node-term_node-term_data-large.png deleted file mode 100644 index 4fcd19146f9..00000000000 Binary files a/help/images/node-term_node-term_data-large.png and /dev/null differ diff --git a/help/images/node-term_node-term_data.png b/help/images/node-term_node-term_data.png deleted file mode 100644 index de1273c98a0..00000000000 Binary files a/help/images/node-term_node-term_data.png and /dev/null differ diff --git a/help/images/overview-ui-large.png b/help/images/overview-ui-large.png deleted file mode 100644 index 04fbe90d148..00000000000 Binary files a/help/images/overview-ui-large.png and /dev/null differ diff --git a/help/images/overview-ui-small.png b/help/images/overview-ui-small.png deleted file mode 100644 index ed7595f26b8..00000000000 Binary files a/help/images/overview-ui-small.png and /dev/null differ diff --git a/help/images/style-breakdown-large.png b/help/images/style-breakdown-large.png deleted file mode 100644 index 698b8cc32ad..00000000000 Binary files a/help/images/style-breakdown-large.png and /dev/null differ diff --git a/help/images/style-breakdown.png b/help/images/style-breakdown.png deleted file mode 100644 index d7513a89bad..00000000000 Binary files a/help/images/style-breakdown.png and /dev/null differ diff --git a/help/images/views1-admin-large.png b/help/images/views1-admin-large.png deleted file mode 100644 index 06744bddc5d..00000000000 Binary files a/help/images/views1-admin-large.png and /dev/null differ diff --git a/help/images/views1-admin.png b/help/images/views1-admin.png deleted file mode 100644 index 398c145b90e..00000000000 Binary files a/help/images/views1-admin.png and /dev/null differ diff --git a/help/images/views1-changeviewtype-large.png b/help/images/views1-changeviewtype-large.png deleted file mode 100644 index 5c58d813770..00000000000 Binary files a/help/images/views1-changeviewtype-large.png and /dev/null differ diff --git a/help/images/views1-changeviewtype.png b/help/images/views1-changeviewtype.png deleted file mode 100644 index 6b1798a33b3..00000000000 Binary files a/help/images/views1-changeviewtype.png and /dev/null differ diff --git a/help/images/views2-addaview-large.png b/help/images/views2-addaview-large.png deleted file mode 100644 index bbad1b18fef..00000000000 Binary files a/help/images/views2-addaview-large.png and /dev/null differ diff --git a/help/images/views2-addaview.png b/help/images/views2-addaview.png deleted file mode 100644 index 546ea169c95..00000000000 Binary files a/help/images/views2-addaview.png and /dev/null differ diff --git a/help/images/views2-adddisplay-large.png b/help/images/views2-adddisplay-large.png deleted file mode 100644 index 51c367551a1..00000000000 Binary files a/help/images/views2-adddisplay-large.png and /dev/null differ diff --git a/help/images/views2-adddisplay.png b/help/images/views2-adddisplay.png deleted file mode 100644 index dff143e56ea..00000000000 Binary files a/help/images/views2-adddisplay.png and /dev/null differ diff --git a/help/images/views2-addfields-large.png b/help/images/views2-addfields-large.png deleted file mode 100644 index b7c1ba58c23..00000000000 Binary files a/help/images/views2-addfields-large.png and /dev/null differ diff --git a/help/images/views2-addfields.png b/help/images/views2-addfields.png deleted file mode 100644 index e70c75817b3..00000000000 Binary files a/help/images/views2-addfields.png and /dev/null differ diff --git a/help/images/views2-addfieldsajax-large.png b/help/images/views2-addfieldsajax-large.png deleted file mode 100644 index a9308a03170..00000000000 Binary files a/help/images/views2-addfieldsajax-large.png and /dev/null differ diff --git a/help/images/views2-addfieldsajax.png b/help/images/views2-addfieldsajax.png deleted file mode 100644 index 3043d04a500..00000000000 Binary files a/help/images/views2-addfieldsajax.png and /dev/null differ diff --git a/help/images/views2-admin-large.png b/help/images/views2-admin-large.png deleted file mode 100644 index d262bc55e7a..00000000000 Binary files a/help/images/views2-admin-large.png and /dev/null differ diff --git a/help/images/views2-admin.png b/help/images/views2-admin.png deleted file mode 100644 index c2733638179..00000000000 Binary files a/help/images/views2-admin.png and /dev/null differ diff --git a/help/images/views2-changedisplaystyle-large.png b/help/images/views2-changedisplaystyle-large.png deleted file mode 100644 index 09925df87fb..00000000000 Binary files a/help/images/views2-changedisplaystyle-large.png and /dev/null differ diff --git a/help/images/views2-changedisplaystyle.png b/help/images/views2-changedisplaystyle.png deleted file mode 100644 index 5a82ea5610d..00000000000 Binary files a/help/images/views2-changedisplaystyle.png and /dev/null differ diff --git a/help/images/views2-fieldspreview-large.png b/help/images/views2-fieldspreview-large.png deleted file mode 100644 index e2730b414b4..00000000000 Binary files a/help/images/views2-fieldspreview-large.png and /dev/null differ diff --git a/help/images/views2-fieldspreview.png b/help/images/views2-fieldspreview.png deleted file mode 100644 index 5a41ab29de0..00000000000 Binary files a/help/images/views2-fieldspreview.png and /dev/null differ diff --git a/help/images/views2-newview-large.png b/help/images/views2-newview-large.png deleted file mode 100644 index 498627a9094..00000000000 Binary files a/help/images/views2-newview-large.png and /dev/null differ diff --git a/help/images/views2-newview.png b/help/images/views2-newview.png deleted file mode 100644 index b522d2ce36b..00000000000 Binary files a/help/images/views2-newview.png and /dev/null differ diff --git a/help/images/views2-rearrangefields-large.png b/help/images/views2-rearrangefields-large.png deleted file mode 100644 index acfed4cdf86..00000000000 Binary files a/help/images/views2-rearrangefields-large.png and /dev/null differ diff --git a/help/images/views2-rearrangefields.png b/help/images/views2-rearrangefields.png deleted file mode 100644 index 562df08d685..00000000000 Binary files a/help/images/views2-rearrangefields.png and /dev/null differ diff --git a/help/images/views2-tablestyle-large.png b/help/images/views2-tablestyle-large.png deleted file mode 100644 index 67e9e6b9cc0..00000000000 Binary files a/help/images/views2-tablestyle-large.png and /dev/null differ diff --git a/help/images/views2-tablestyle.png b/help/images/views2-tablestyle.png deleted file mode 100644 index f8997403ac2..00000000000 Binary files a/help/images/views2-tablestyle.png and /dev/null differ diff --git a/help/images/views3-group-aggregation-types.png b/help/images/views3-group-aggregation-types.png deleted file mode 100644 index ac6f32fe598..00000000000 Binary files a/help/images/views3-group-aggregation-types.png and /dev/null differ diff --git a/help/images/views3-group-aggregation.png b/help/images/views3-group-aggregation.png deleted file mode 100644 index ef93bba66e1..00000000000 Binary files a/help/images/views3-group-aggregation.png and /dev/null differ diff --git a/help/images/views3-jump-style-menu.png b/help/images/views3-jump-style-menu.png deleted file mode 100644 index 6945b94efeb..00000000000 Binary files a/help/images/views3-jump-style-menu.png and /dev/null differ diff --git a/help/images/views3-semanticviews.png b/help/images/views3-semanticviews.png deleted file mode 100644 index e01163a794a..00000000000 Binary files a/help/images/views3-semanticviews.png and /dev/null differ diff --git a/help/images/views3-views-all.png b/help/images/views3-views-all.png deleted file mode 100644 index 27ce88ed40a..00000000000 Binary files a/help/images/views3-views-all.png and /dev/null differ diff --git a/help/menu.html b/help/menu.html deleted file mode 100644 index bb818a39b08..00000000000 --- a/help/menu.html +++ /dev/null @@ -1,21 +0,0 @@ -Page displays can hook into the Drupal menu system and provide menu links that will appear in the Navigation system as well as tabs that can be used to keep Views next to each other. - -For simple menu links, there is very little you need to do; simply select 'Normal menu entry' and fill in the text for the title. This will appear in the Navigation menu by default; you will need to visit the menu administration page to move this to another menu. - -Tabs are not quite so simple; there are some complex rules for using tabs in Drupal. -
    -
  1. All tabs must have a parent, which is the next level up in the path hierarchy. For example, if the view path is 'example/taba' then the parent must be 'example'. -
  2. All tabs must have one and only one default tab; this is usually the same content as the parent. -
  3. If a parent does not exist, when creating the 'default' tab, Views will allow you to also create a parent item. It will automatically set up the URL for you when it does this. -
  4. Tab weight is used to control what order the tabs are displayed in. Lower numbers will display more to the left. For tabs whose numbers are the same, they will be displayed alphabetically. -
  5. Drupal only supports 2 levels of tabs, so be careful about trying to put tabs within tabs within tabs. That won't work. -
- -For example, if you have two views that you want to be tabs, you could set it up like this: - - -With this done, you will now have a Navigation link named 'Tabs' and when you click on it, you will go to the tabs, with 'Tab 1' being the default tab that appears. You can then click between Tab 1 and Tab 2. diff --git a/help/misc-notes.html b/help/misc-notes.html deleted file mode 100644 index 8efc1f9e3e4..00000000000 --- a/help/misc-notes.html +++ /dev/null @@ -1,11 +0,0 @@ -

Image Assist & ImageField Assist

-Under certain conditions these modules can block access to the header input section of the admin. -They need to be disabled on certain views paths. To do this go to -Image assist ->Access settings -check "NOT on specific paths": -and enter - -Drupal 7.x has different paths -admin/structure/views/ajax/display/* -admin/structure/views/ajax/* -For futher reference please see this issue for more information diff --git a/help/new.html b/help/new.html deleted file mode 100644 index bee52e9f039..00000000000 --- a/help/new.html +++ /dev/null @@ -1,131 +0,0 @@ -Views 3 is the newest major release of Views and is coded for Drupal 6. Views 3 retains all of the core functionality of previous releases, together with a completely revamped user interface and a large set of new features. - -Major new features (these need help files): -
    -
  1. Views Or has been incorporated.
  2. -
  3. Semantic views have been incorporated.
  4. -
  5. Group by possibility.
  6. -
  7. The Jump Menu style has been added.
  8. -
  9. The Panel Fields style has been added.
  10. -
  11. Pluggable back ends
  12. -
  13. Pluggable text areas, pagers, and forms
  14. -
  15. Translation plugin
  16. -
  17. Exposed sorts
  18. -
  19. Reliance on CTools
  20. -
- -Everything below this point is subject to change based on the new Views wizard and UI in 7.x. - -

Note: Only UID 1 or users with the "Use PHP code" permission from the phpfilter module will be able to import views.

- -

Admin interface

-The first thing that pops out after you install Views 2 is the radically different admin interface: -
- -Views 2 admin interface -
- -compared to the old comfy Views 1 interface: - -
- -Views 1 admin interface -
- -The new admin interface performs the same functions as the old -- listing all the views in the system, providing links to add or import views and a link to Views Tools -- but has been compacted, with each view displayed as a paragraph style-row compared to the table of Views 1 and set of filters on top to ease locating views among a large list. - -Context-help is available by clicking the small blue question-mark icon. Context-help in Views 2 is provided by the Advanced Help module, so make sure to install that together with installing Views 2. The small blue help icons will be available in various parts of the Views UI. In particular, look for them as part of the description of a display, when setting style options, and in various editing sections such as path, menu and the like. - -Several new attributes of each view are visible in the filter header: -
    -
  1. Tag - This is just another label for organizing and sorting views. Tags can be any text. Views that are provided by modules will often be tagged together to make it easy to find them. Tags are also added to your template suggestions, so take care what you set here. For example setting the tag Page will give all your views the Page template.
  2. -
  3. Display - In Views 1 each view query was tied to its display; in other words your fields, sorts, filters, and arguments could only be displayed in the single page or block display provided in the view definition. In Views 2, view displays have been decoupled from view queries - it is now possible to have multiple page, block, and feed displays from a single view. More on view displays later.
  4. -
  5. Type - Views 2 view types are radically different from Views 1 types. Views 1 types basically defined how the node list displays were styled - you had Full Nodes, Teaser List, Table View, and so on. In Views 2 view display styles have been broken out into the separate Style attribute. View types now refer to the primary table on which information for the query will be retrieved which controls what arguments, fields, sort criteria and filters are available. Views 2 view types are discussed later. -
  6. -
- -

Adding a view

-So let's jump in and add a view. For this example, we're going to create a user view, which will display a list of users. -
- -Adding a view -
- -The first step in adding a view is simply entering a name (only alphanumeric characters, no spaces) a description, tag, and the view type. To get the user view, we selected the User radio button. - -
- -Configuring the new view -
- -This might be the 2nd whoa moment as the interface here is also completely revamped from Views 1.x. The best way to summarize is to say all the pieces from the Views 1.x interface are still there...just in different places. Fields, arguments, sort critera and filters are all still there there, just in new AJAXY-flavours. - -Let's start by adding some fields: - -
- -Adding fields -
- -Clicking on the [+] icon next to the word Fields unfurls a section beneath the view information with all the available fields grouped by Comment, File, Node, Node revision, Taxonomy and User, and probably a few others. This is a general paradigm for the Views 2 interface -- clicking on a widget or link unfurls a section beneath the view information with the relevant interface. Usually, what is being edited will be hilited in yellow, as well. - -When adding items, you can use the Groups drop-down box to show only a subset of the fields available according to the above groups, or select All to see all fields available, which is what was selected when the section unfurled. For our example, we're selecting the 'User' group and adding the User: E-mail, User: Name and User: Picture fields. - -
- -Adding fields -
- -Once we add our fields they show up in the Fields section of the interface. We will be walked through each field we added, so keep clicking update, even if you don't make changes to the field and you will see the next one. - -The fields we added can be rearranged by clicking the up/down icon, right next to the add icon we used earlier. We can also remove a field using the same interface. - -
- -Rearranging fields -
- -From here, the fields can be dragged up and down by grabbing the little drag handle on the left and moving them where you like. Making a change to any part of the view by clicking update usually triggers a refresh of the view preview which is conveniently located right below the main interface. - -
- -Views preview -
- -Now that we have some fields set up we can turn our attention to Basic Settings for the view. - -It's important to note that all the interface elements pertain to the current Display selected for the view. As mentioned before a view can have multiple displays. The first time you create a view you'll be manipulating the Default display. You can add displays using the Add Display button, whose Basic Settings are completely different from each other; this lets you have as many displays of a view as you would like all sharing items such as Sort Criteria, Filters and Arguments but different display settings like Title, Style, Fields, and Pager settings. Also, any display you add automatically inherits display settings from the default display initially, so you can keep a core of common settings in your default display and add additional settings for every other display. - -
- -Adding a Page display -
-Let's stick with the Default display and twiddle some settings. We can set the Title to "User View 1" and the Style to Table. As mentioned earlier, view styles in Views 2 correspond more to view types in Views 1 (remember, List, Table, Teasers, Full nodes). - -
- -Selecting a Views 1 View Type -
- -In Views 2, view styles control how a view display looks. These styles are significantly different from the Types in Views 1; in particular, types have been 'broken up'; there is now the style as well as the row style which focus on different parts of the output. - -
- -A breakdown of View output -
- -We change the style by clicking on the current style on the left hand side of the View information area. - -
- -Selecting a Views 2 Display Style -
- -We're given the style options of Grid, List, Table and Unformatted. Additional display styles can be added by modules which have Views style plugins. Choosing a style reveals a "settings" button which you can click to configure the style you've chosen. In the shot below we've selected and are configuring the Table style, which we're using to produce a more compact output than we had earlier. - -
- -Selecting and configuring the table style -
- -... TODO: Finish this document ... diff --git a/help/other-help.html b/help/other-help.html deleted file mode 100644 index a2100f398ec..00000000000 --- a/help/other-help.html +++ /dev/null @@ -1,9 +0,0 @@ -There are many tutorials, podcasts, and a few books on Views that you can turn to for further help. - -Books: -Drupal Building Blocks is the Views' author book; check the Drupal.org books page for a fairly comprehensive list. - -Videos: -See this page. - -Google. Many Drupal shops put together helpful tutorials and publish them to Drupal Planet, not to mention the countless users of Views who do it for the community. diff --git a/help/overrides.html b/help/overrides.html deleted file mode 100644 index 08fb356bfb8..00000000000 --- a/help/overrides.html +++ /dev/null @@ -1,6 +0,0 @@ - -If an item is using defaults then it is using values from the default display. IMPORTANT NOTE: If you modify this value, you are modifying the default display and thus modifying for all displays that are using default values. - -If that is not what you intend, you must click the override button. Once overridden, that display now has its own version of the value; modifying it will not modify it for other displays. You can override in the settings of the non-default display when you are clicking on the header of the section or on the rearrange button. - -For relationships, arguments, fields, sort criterias, and filters, each of these must be overridden as a group! In other words, you cannot override a single filter, but instead must override all filters. A message will appear on the item to let you know what its status is, but you can only change the status by clicking on the header or the rearrange button for that item. diff --git a/help/path.html b/help/path.html deleted file mode 100644 index eb44de7915d..00000000000 --- a/help/path.html +++ /dev/null @@ -1,7 +0,0 @@ -If a display has a path that means that it can be retrieved directly by calling a URL as a first class page on your Drupal site. Any items after the path will be passed into the view as arguments. For example, if the path is foo/bar and a user visits http://www.example.com/foo/bar/baz/beta, 'baz' and 'beta' will be given as arguments to the view. These can be handled by adding items to the arguments section. - -You may also use placeholders in your path to represent arguments that come in the middle. For example, the path node/%/someview would expect the first argument to be the second part of the path. For example, node/21/someview would have an argument of '21'. - -Note: Views 1 used $arg for this kind of thing. $arg is no longer allowed as part of the path. You must use % instead. - -If multiple displays within the same view have the same path, the user will get the first display they have access to. This means you can create successfuly less restricted displays in order to give administrators and privileged users different content at the same path. diff --git a/help/performance-views-vs-displays.html b/help/performance-views-vs-displays.html deleted file mode 100644 index 9f02a5a908b..00000000000 --- a/help/performance-views-vs-displays.html +++ /dev/null @@ -1,5 +0,0 @@ -

Multiple displays in one view is appropriate when they are fundamentally similar and are sharing quite a fair amount of data. For example, showing upcoming events in either blocks or page and sorting it according to either event name or date of the event will be appropriate to be implemented by four displays (two blocks and two pages) in one view.

- -

In the other hand, having multiple displays in one view that contains mostly overrides will be a burden to the system and will be hard to maintain. The effect of having only couple of such displays has negligible performance difference. It will be magnified when the number of displays in one view is large.

- -

Another consideration is the use of Views, especially when using multiple views in conjunction with other modules such as Panels. It is entirely possible to have many views on a page due to Panels' ability to contain a view in each pane. Some people have mistaken this as a problem on Panels' or Views' part, but realistically it is likely to be the sheer number of queries that are being run during page render.

diff --git a/help/performance.html b/help/performance.html deleted file mode 100644 index e393452e11a..00000000000 --- a/help/performance.html +++ /dev/null @@ -1 +0,0 @@ -

Views module is optimized for certain practices. To ensure Views has its best performance, please follow these best practices for Views.

diff --git a/help/relationship-representative.html b/help/relationship-representative.html deleted file mode 100644 index cf7feb5b798..00000000000 --- a/help/relationship-representative.html +++ /dev/null @@ -1,14 +0,0 @@ -A representative relationship obtains just one object from the linked in objects. - -This is best explained with an example. Suppose you have a term view that shows you the terms in your vocabulary: Horse, Cat, Aardvark. -In addition to the term names, you want to show the title of the most recent node in that term. This would give you a view that shows: Horse - latest horse node title, Cat - latest cat node title, Aardvark - latest aardvark node title. -Each of these is the title of the representative node for that term, chosen by creation time. - -Any sort criterion can be used to choose the representative node. You might instead want to show the node with the most comments for each term, the first node in alphabetical order, or if you have a voting module installed, the most popular node. - -The options for a representative relationship let you choose a sort criterion and a sort order. This determines how the representative object is chosen: the first object returned by the sort is shown. For example, choose 'Node: title' and 'Ascending' to get the first node by title as the representative; or 'Node: comment count' and 'Descending' to get the node with the most comments. - -

Performance

-These relationships require a correlated subquery. This can be slow to run on large amounts of data, as the subquery must be run for every row of the main query. - -For more on this topic, see the MySQL tutorial on group-wise maximum queries. diff --git a/help/relationship.html b/help/relationship.html deleted file mode 100644 index 2e3c09ca056..00000000000 --- a/help/relationship.html +++ /dev/null @@ -1,17 +0,0 @@ -Relationships allow you to expand the query to include objects other than the base query. This is actually made more difficult to understand by the fact that Views actually includes a few relationships by default, and doesn't tell you they're there. For historical reasons, it would be inconvenient to remove these default relationships. When relationships are present, all fields (including relationships) will gain a new form item to let you select which relationship they will use. They will default to using no relationship at all. - -The main example of the relationship that is there by default is the node --> user relationship; every node has an author, and if a node is in the query, the user who wrote that node is automatically made available. [Note: the author considers it an error that this relationship is automatic, but by the time it was realized this was in error, it was too late to change it.] - -A similar relationship that is not automatically made available is for node revisions. Each revision has its own author, which is the user who made the revision. By adding the "Node revision: User" relationship, all of the 'user' fields, sorts, filters and arguments available to a user will now be available for the revision author. - -When a relationship is added to the view, all applicable items will gain a "Relationship" select box, where you can choose which version of that particular item you wish to use. This can be illustrated with an example: - -A 'comment' view contains the relationships 'Comment: node' and 'Comment: user'. This means that all the fields for the node that a comment is attached to are available, and all the user fields for that node author also become available. The other relationship makes fields for the author of the comment available -- very often not the author of the node! - -When you add the "User: name" field, you will be presented with a select box. Either the node relationship or the user relationship must be selected, because there are two possible user names in the view to choose from. - -Another example of relationships involves the Files table. In Drupal, files are related to users, but files are not necessarily related to nodes. However, the upload.module allows some files to be attached to nodes. The only way for Views to deal with this discrepancy is with relationships. When creating a 'node' view, it's possible to add an uploaded files relationship to get file data for nodes that were attached with the upload module. It is also possible to go the other way; from a files view you may add a relationship via the Upload table to view information about the node. - -Drupal 7 made significant changes to Taxonomy. Because of this, many taxonomy functions Views can perform are now part of relationships. If you can't find the filter you need, add either the related taxonomy terms relationship, or a relationship on the specific taxonomy field. - -You can override the complete relationship section - see overrides for more information. diff --git a/help/reports.html b/help/reports.html deleted file mode 100644 index 2a6087355cd..00000000000 --- a/help/reports.html +++ /dev/null @@ -1,3 +0,0 @@ -Visit admin/reports/views-fields to see an overview of fields usage across all the views. - -It's useful to check for unused or misused fields. diff --git a/help/select-multple-nids-contextual-filters.html b/help/select-multple-nids-contextual-filters.html deleted file mode 100644 index 433d751cee2..00000000000 --- a/help/select-multple-nids-contextual-filters.html +++ /dev/null @@ -1,28 +0,0 @@ -We assume that you have a properly configured view at this point. You should have a page or block display with fields/node to be displayed in it. - -
    -
  1. In the views administration screen add a new 'contextual filter' using 'add'. You will see a configuration screen appear as a modal.
  2. - -
  3. In the 'Filter' jump menu that you now see select 'Content'. A list will appear below the jump menu.
  4. - -
  5. In the list look for 'Content: Nid', and check it.
  6. - -
  7. Press the 'Add and configure contextual filters' button. You will now get the configuration screen for 'Content: Nid'.
  8. - -
  9. Under 'When the filter value is NOT in the URL' select 'Provide default argument', and leave it set at 'Fixed value'.
  10. - -
  11. In the field 'Fixed value' add the Nids of the nodes separated by a '+' that you want to show by default.
  12. - -
  13. In 'When the filter value IS in the URL or a default is provided' choose 'Specify validation criteria'. Now select the content types you want, or leave blank for all nodes.
  14. - -
  15. Check the 'Validate user has access to the node'. This will check if a user has permission to view nodes, that are going to be displayed
  16. - -
  17. For the 'Filter value format' select 'Node IDs separated by , or +'.
  18. - -
  19. Select the MORE link.
  20. - -
  21. Check 'Allow Multiple Terms per Argument' and press 'Apply (all displays -)' (or choose a particular display in the dropdown at the top and Apply (this display)).
  22. -
- -Preview should now show nodes, that you selected as "default argument". You can now pass arguments to your view, to select custom node IDs. If you provide no argument, default will be used. Save the view when ready. diff --git a/help/semantic-views.html b/help/semantic-views.html deleted file mode 100644 index ef645c6d100..00000000000 --- a/help/semantic-views.html +++ /dev/null @@ -1,18 +0,0 @@ -The Semantic Views module has been mostly incorporated into Views 3.x. Semantic Views is still around for people who need it, though. For some details on how the original module is different from the Views implementation, please see this issue. - -Semantic views help you insert markup of your own from the Views UI, so that you can fairly easily override the default markup without having to restyle via templates. - -As a usage example, - -In a view with a field: -
    -
  1. Configure the field. (Click on the field.)
  2. - -
  3. In the modal that opens, scroll down to Style Settings.
  4. - -
  5. Choose one or more of the three Customize options. This will reveal a dropdown menu where you can choose from one or more HTML tags to use on that field and allow you to add a CSS class specific to that field should you desire.
  6. - -
  7. Decide if you want to keep the Views default classes. Unchecking this box means your markup is *it*.
  8. -
- - diff --git a/help/sort.html b/help/sort.html deleted file mode 100644 index 322537ed38a..00000000000 --- a/help/sort.html +++ /dev/null @@ -1,28 +0,0 @@ -Sort criteria determine what order the records are retrieved from the database and displayed in; generally, all you need to do is pick a field and choose ascending (1, 2, 3, 4) or descending (4, 3, 2, 1) and it will be done. If you have multiple sort criteria, the second (and later) items only come into play if the first item is the same. - -In Views 3.x, sorts may be exposed just as filters are. Note that if only one item is exposed for sorting, the dropdown menu created by the exposed sort will only have one item in it. Some users may find this odd. - -Different data types sort just a little bit differently from others: -
-
Number fields
-
Number fields sort like you would expect. 1 comes before 2 which comes before 10 which comes before 100 which comes before 200, etc.
-
Text fields
-
Text fields always sort alphabetically, even if the text contains numbers. This can have some odd effects if you have numbers stored in text, because the values 1, 3, 7, 10, 12, 20, 100, 120 will sort like this: -
    -
  • 1
  • -
  • 10
  • -
  • 100
  • -
  • 12
  • -
  • 120
  • -
  • 200
  • -
  • 3
  • -
  • 7
  • -
- -This is because these fields sort purely by characters, and not numeric value. i.e, comparing 200 and 3, the '2' comes before the '3', therefore, '200' is "smaller" than '3'. -
-
Date fields
-
Date fields often can have a 'granularity', which is a way of making similar dates actually be the same date. Take two dates that are close to each other: May 1, 2007 5:30 am and May 1, 2007 9:45am. Without granularity, the two dates are compared and the first date comes before the second date. However, if the granularity is set to 'day' it only looks at the parts of the date up to the day: May 1, 2007 and May 1, 2007. At that point, they are the same, and the sort would move on to the next sort criterion.
-
- -You can override the complete sort criteria section - see
here for more information. diff --git a/help/style-comment-rss.html b/help/style-comment-rss.html deleted file mode 100644 index 5ce1dcd0dc1..00000000000 --- a/help/style-comment-rss.html +++ /dev/null @@ -1 +0,0 @@ -This row style is only available to RSS styles. It produces XML necessary for an RSS feed for the comment. diff --git a/help/style-fields.html b/help/style-fields.html deleted file mode 100644 index 4d8d077b053..00000000000 --- a/help/style-fields.html +++ /dev/null @@ -1,16 +0,0 @@ -The fields row style displays each field defined in the view, one after another. Each field defines its own output. - -By default, each field is put in a <div> unless it is selected to be inline. If it is inline, it is put in a <span>. Two items in <div>s will be displayed one after another, with the second one below the first. Two items in <span>s will be displayed on the same line. One item in a <span> next to <div>s is the same as two items in <div>s. This means that for the inline setting to do anything, at least two consecutive items must be set inline. - -You may define a separator which will be placed between each item. This separator may be html. You can use &nbsp; to print blank space. - -If the view's row style is set to "fields", fields must be added to the View. If there are no fields, you may receive validation errors such as: - -* Display "Defaults" uses fields but there are none defined for it or all are excluded. -* Display "Page" uses fields but there are none defined for it or all are excluded. - -This is because the row style "fields" expects at least one field for display. - -There is also an option to hide empty fields, so empty fields, along with their labels or markup will not be displayed. - -There is also an option to hide empty fields, so empty fields, along with their labels or markup will not be displayed. diff --git a/help/style-grid.html b/help/style-grid.html deleted file mode 100644 index 463e2bdc049..00000000000 --- a/help/style-grid.html +++ /dev/null @@ -1,22 +0,0 @@ -The grid style will display each row of your view within a grid. You may customize the number of columns, though it defaults to 4. A grid looks like this: - - - - - - -
row 1row 2row 3row 4
row 5row 6row 7row 8
row 9row 10row 11row 12
row 13row 14row 15row 16
- -The above uses the horizontal alignment, where rows are added into the grid from left to right. - -With a vertical alignment, rows will be placed from top to bottom, like this (your row results will appear as columns): - - - - - -
row 1row 5row 9row 13
row 2row 6row 10row 14
row 3row 7row 11row 15
row 4row 8row 12row 16
- -You can also choose to group a field from the Fields Section. This grouping field will be displayed as a header, and all rows will be displayed beneath it. - -This style uses a row style to determine what each row will look like. diff --git a/help/style-grouping.html b/help/style-grouping.html deleted file mode 100644 index 8b0c9a7a4f5..00000000000 --- a/help/style-grouping.html +++ /dev/null @@ -1,7 +0,0 @@ -Many styles can be grouped. For styles that can, there will be a 'grouping field' option; pick one of the fields to group by. This grouping field will be displayed as a header, and all rows will be displayed beneath it. - -If the style is not grouped then the corresponding style output template will by invoked once when displaying the view. If the style is grouped, then the style output template will be invoked once per group. The text if the grouping filed is passed to the template in the $title variable. - -Views is very naive about grouping, and it can only group on one field. It doesn't understand anything about which object (node, comment, etc.) the field belongs to, and doesn't make any smart grouping choices based on the parent object of the grouping field. The grouping field does not modify the views SQL query - grouping is handed after records are retrieved from the database. - -The devel_themer module is known to break grouping. If grouping is not working, please check and make sure the devel modules are disabled. diff --git a/help/style-jump.html b/help/style-jump.html deleted file mode 100644 index dc8532f8f9b..00000000000 --- a/help/style-jump.html +++ /dev/null @@ -1,48 +0,0 @@ -With the jump menu style can you create selectbox menus for the content of your site. - - - -The jump menu style will display each row of your view within a jump menu. This style requires that your view's row style is set to fields. - -To properly configure a jump menu, you must select one field that will represent the path to utilize. In most cases, you will need to rewrite the output of this field. You should set that field to exclude from display. All other displayed fields will be part of the menu. Please note that all HTML will be stripped from this output as select boxes cannot show HTML. - -Some examples of how this might be useful: - - -

Jump to a node

-
    -
  1. Create a new Node view
  2. -
  3. Select the Node: Path and Node: Title fields
  4. -
  5. Configure the Node: Path field to "exclude from display" and check "Use absolute link"
  6. -
  7. Configure the Node: Title field by removing the "Label" and unchecking "Link this field to its node"
  8. -
  9. Set the view style to jump menu
  10. -
  11. In the style settings, set the "Path field" to Node: Path
  12. -
- -Your view will now display with a select list and a Go button. If you select an item in the list and hit the Go button you will see the selected node's page in the browser. - -

Jump to a node's edit page

-
    -
  1. Create a new Node view
  2. -
  3. Select the Node: Nid and Node: Title fields
  4. -
  5. Configure the Node: Nid field to "exclude from display" and check "Rewrite the output of this field"
  6. -
  7. In the text field that appears for rewriting the output of this field, enter node/[nid]/edit
  8. -
  9. Configure the Node: Title field by removing the "Label" and unchecking "Link this field to its node"
  10. -
  11. Set the view style to jump menu
  12. -
  13. In the style settings, set the "Path field" to Node: Nid
  14. -
- -Your view will now display with a select list and a Go button. If you select an item in the list and hit the Go button you will see the selected node's edit page in the browser. Please note that users without rights to the node's edit page will see an access denied message. - -

Jump to a user profile

-
    -
  1. Create a new User view
  2. -
  3. Select the User: Uid and User: Name fields
  4. -
  5. Configure the User: Uid field to "exclude from display" and check "Rewrite the output of this field"
  6. -
  7. In the text field that appears for rewriting the output of this field, enter user/[uid]
  8. -
  9. Configure the User: Name field by removing the "Label" and unchecking "Link this field to its user"
  10. -
  11. Set the view style to jump menu
  12. -
  13. In the style settings, set the "Path field" to User: Uid
  14. -
- -Your view will now display with a select list and a Go button. If you select an item in the list and hit the Go button you will see the selected user's profile page in the browser. diff --git a/help/style-list.html b/help/style-list.html deleted file mode 100644 index 86355a51a13..00000000000 --- a/help/style-list.html +++ /dev/null @@ -1,20 +0,0 @@ -The List view style will display every row of the view as part of an HTML list construct. For example: - - -You may select whether or not the list is ordered which just means whether or not it uses numbers instead of the bullet: - -
    -
  1. Row 1
  2. -
  3. Row 2
  4. -
  5. Row 3
  6. -
  7. Row 4
  8. -
- -The list style also uses a row style which means that it doesn't care what the actual output for each row of the view is. - -If you need information about using CSS to style list views, you may find this A list apart guide to styling lists useful. diff --git a/help/style-node-rss.html b/help/style-node-rss.html deleted file mode 100644 index 7a97bdd56e3..00000000000 --- a/help/style-node-rss.html +++ /dev/null @@ -1 +0,0 @@ -This row style is only available to RSS styles. It produces XML necessary for an RSS feed for the node record. diff --git a/help/style-node.html b/help/style-node.html deleted file mode 100644 index 928980f20d7..00000000000 --- a/help/style-node.html +++ /dev/null @@ -1,11 +0,0 @@ -The node row style will display each item of the view through Drupal's standard node_view() function. Views has very little control over this output, except for the options you see. You can choose from different Build modes. By default there are "Teaser" and "Full node". You can also decide if you want to "Display links" and/or "Display node comments". - -Because the output is run through the standard node template mechanism (typically node.tpl.php or a variant thereof), any decisions about what is output may be done there. - -Views does add an extra 'suggestion' to the list of possible node templates: node--view--VIEWNAME.tpl.php -- you may use this to theme a node specifically for the view. This can be handy for creating very small teasers and the like. - -You may opt to display the full node body or the node teaser, and you may add the node links (such as the 'comment' links that appear after a node) or not. - -Because of this behavior, the node row style does not utilize fields and the Fields section will not be displayed. - -Please note that this row style performs a node_load() for every row, and as such can produce a lot of extra queries. Sometimes this is necessary, but it can have a negative impact on your site's performance! diff --git a/help/style-row.html b/help/style-row.html deleted file mode 100644 index a8406d35891..00000000000 --- a/help/style-row.html +++ /dev/null @@ -1,11 +0,0 @@ -A row style is an individual style to display only an individual record within a view. You can choose between node or fields. For example, a node type view would display one node per row; a user type view would display one user per row. - -When you choose fields, you must have entries in the Fields section to produce an output. To set some options for fields, read here. - -Some row styles use fields which means you may select from the available fields to display. Others row styles do not - they are able to use the base type and create a display. Usually, row styles that do not use fields produce less efficient (slower) views, so bear this in mind when contemplating the performance of your site. - -When you choose node the complete node will display through Drupal's standard node_view() function. You can choose some options. - -When styling views, it's important to realize that the unformatted styles will take the majority of styling from more specific templates. In an unformatted style, the row style will provide theming. For instance, in a view that uses fields as its primary data, the views-view-fields.tpl.php will provide the theming. - -Mustardseed created a videocast on row theming that can be viewed here. diff --git a/help/style-rss.html b/help/style-rss.html deleted file mode 100644 index e67bd3092dd..00000000000 --- a/help/style-rss.html +++ /dev/null @@ -1,5 +0,0 @@ -The RSS output style is only available for Feed display types. It will display the view as an RSS feed, which is a specialized XML output. This output is not user visible, but can be parsed by feed readers for aggregation. - -You may supply a description for the RSS feed; most feed readers will display this description along with the contents of the feed. You may also select to use the site's mission statement for the description. - -Please note that when using RSS views only comes with the one RSS style. There's no style override for RSS. Modules can add more. diff --git a/help/style-settings.html b/help/style-settings.html deleted file mode 100644 index 63133d81114..00000000000 --- a/help/style-settings.html +++ /dev/null @@ -1,3 +0,0 @@ -Views includes many options for theming or styling. - -TODO: add more here. diff --git a/help/style-summary-unformatted.html b/help/style-summary-unformatted.html deleted file mode 100644 index bd14f249dba..00000000000 --- a/help/style-summary-unformatted.html +++ /dev/null @@ -1,3 +0,0 @@ -The unformatted summary style is only available for summary styles, which are when an argument has been set to provide a summary if it was not provided with a value. This summary provides the possible candidates for the argument one after another with no special formatting. If inline is selected, the summary items will be enclosed within <span> tags. Otherwise the items will be in <div> tags. - -You can also elect to display the number of matching records for the argument, plus change the number of items per page for the summary. This is often useful because summary views are often quite small, but other views quite space intensive. It is very common to have far more records available in the summary view than in the more normal view. diff --git a/help/style-summary.html b/help/style-summary.html deleted file mode 100644 index 0c3845faed1..00000000000 --- a/help/style-summary.html +++ /dev/null @@ -1,3 +0,0 @@ -The list summary style is only available for summary styles, which are when an argument has been set to provide a summary if it was not provided with a value. This summary provides a list of possible candidates for the argument in a standard HTML list. Like the normal list style, you may set this list to be ordered or not. - -You can also elect to display the number of matching records for the argument, plus change the number of items per page for the summary. This is often useful because summary views are often quite small, but other views quite space intensive. It is very common to have far more records available in the summary view than in the more normal view. diff --git a/help/style-table.html b/help/style-table.html deleted file mode 100644 index 9fc8175e688..00000000000 --- a/help/style-table.html +++ /dev/null @@ -1,13 +0,0 @@ -The table style will display the View results as a table; each row of the table will correspond to a row from the view result. - -When setting the table options, each field in the view will be presented with some information next to each field: -
-
Column
-
By default, each field is its own column. However, you can place multiple fields in the same column. To do this, pick which field you want to represent the column, then pick another field and set the 'column' value to that field. You can place as many fields as you like in a single column, but only the main field in a column can be click-sorted.
-
Separator
-
If you have multiple fields in the same column, the separator will be placed between each one. At the very least, &nbsp; should be used, as without the separator the fields will be placed very close to each other. Common separators are a bullet, the | symbol, and a comma. If there are no other fields in the column, the separator will have no effect.
-
Sortable
-
If checked, the header for the column will be clickable, and the user may re-sort the table by clicking on this to sort by that field. At this time Views does not support click-sorting to sort by multiple columns at the same time.
-
Default sort
-
You may select a column which will be sorted by default when the table is first viewed. This column will be highlighted to the user. You may also select whether the default sort is ascending or descending.
-
diff --git a/help/style-unformatted.html b/help/style-unformatted.html deleted file mode 100644 index 99fa3de7fa4..00000000000 --- a/help/style-unformatted.html +++ /dev/null @@ -1 +0,0 @@ -The unformatted output style simply places each row of the view, one after another, with no additional formatting. diff --git a/help/style.html b/help/style.html deleted file mode 100644 index d32a2edad2a..00000000000 --- a/help/style.html +++ /dev/null @@ -1,15 +0,0 @@ -The Views' style system is how you customize the output produced by your view. A view style is basically a smart theme template that processes the view data and then outputs it. All styles in Views can be overridden by placing copies of the templates in your theme directory and then modifying them. See the theme: information link available on all views to get hints for which templates a given view is using. - -
- -A breakdown of View output -
-By default, the style is unformatted, which means that there is very little style actually used; the records are simply displayed one after another, enclosed in a <div> tag so that you can use CSS to manipulate the view. - -Some styles use a separate row style to determine how each row of the View looks. This is useful for mixing and matching styles to more readily produce exactly the kind of output you need. - -Many styles can be grouped. For styles that can, there will be a 'grouping field' option; pick one of the fields to group by. Please see Grouping in styles for more information. - -Each style is its own entity. - -If you want your fields to be templatable, you need to use values that are acceptable in function names. That's actually more strict, since that basically limits you to alphanumeric and _. Even though Views may be able to query datastores that use special characters, naming is still important for use in templates. diff --git a/help/taxonomy-page-override.html b/help/taxonomy-page-override.html deleted file mode 100644 index f67623477b2..00000000000 --- a/help/taxonomy-page-override.html +++ /dev/null @@ -1,41 +0,0 @@ -NOTE: This page has not been updated for 7.x-3.x -Views 2 provides a way to override the taxonomy pages of any term. The view is included by default but is disabled. This page covers three minor aspects that some users could use to control the aspect of their taxonomy pages. - -

Background

-The Taxonomy module provides a way to organize content through the site. It also presents a page with nodes that belong to some term. The style can't be changed easily and taxonomy only displays node teasers. - -

Force All

-When using vocabularies with multiple term levels, a top level won't include the nodes that belongs to the levels inside. Let's clarify this with an example, let's assume the site have this vocabulary: - - -Vocab - - Term 1 - -- Term 2 - -- Term 3 - - Term 4 - -- Term 5 - -- Term 6 - - -If you go to taxonomy/term/1, then you see all nodes in Term 1 listed, but not nodes in Term 2 and Term 3. If you want to see all nodes in Term 1, Term 2 and Term 3 in a single page, you have to go to - - -taxonomy/term/1/all - - -Views 2 allows you to show all terms inside another term. - -

Step 1. Enabling taxonomy_term

-The first step we need to do is to enable the "taxonomy term" view that views provides for us. After we've done that we need to edit it. - -

Step 2. Changing minor aspects

-On the Display: Page, we can change the Style to any of the styles that views provides for us, it could be a table or a list. If we do this it's necessary to add some fields to the view. - -The most important thing we're going to change it's the argument Taxonomy: Term ID: (with depth). At the bottom of the screen, you'll have 2 options, the first one to change it's the depth, if we want to do what the Taxonomy Force All modules does, you'll have to set it up for at least 1. - -The next thing you have to do it's check the Set the breadcrumb for the term parents option. This will allow your view to show the breadcrumb with all the term levels in your taxonomy. - -Save the changes and try. Next you could do whatever you want, like adding fields, theming, exposing filters, sorting or adding feeds. - -

Theme every vocabulary/term independently

-Using TVI: Taxonomy Views Integrator it's possible to theme every vocabulary or term with it's own view. All you have to do is clone the view in Step 1 and set it as the TVI active view in the vocab or term edit pages. diff --git a/help/theme-css.html b/help/theme-css.html deleted file mode 100644 index a23d9e556d5..00000000000 --- a/help/theme-css.html +++ /dev/null @@ -1,76 +0,0 @@ -Views uses a wide array of CSS classes on all of its content to ensure that you can easily and accurately select exactly the content you need in order to manipulate it with CSS. - -It is possible to enter a custom css class under Style settings. The CSS class names will be added to the view. This enables you to use specific CSS code for each view. You may define multiples classes separated by spaces. - -Typically, every view is wrapped in a div with the name of the view as part of its class (for all these examples, we will assume the name of the view is myview), as well as the generic class 'view': - -
-<div class="view view-myview">
-...
-</div>
-
- -In your CSS, you can modify all views: - -
-div.view {
-  border: 1px solid black;
-}
-
- -Or just your view: - -
-div.view-myview {
-  background: yellow;
-}
-
- -By default, the general view template also provides the following classes to easily style other areas of the view: - - -So for example: -
-div.view-myview div.view-header {
-  /* make the header stand out */
-  font-size: 120%;
-  font-weight: bold;
-}
-
-div.view-myview div.view-footer {
-  /* Make the footer less important */
-  font-size: 80%;
-  font-style: italic;
-  color: #CCC;
-}
-
- -In the above example, we whimsically made the header bold and in a bigger font, and the footer smaller, italicized, and greyish. - -

Views with fields

-If your view has fields, each field is uniquely tagged with its ID. A field's ID may be gleaned from the Theme: Information page. Note that due to CSS rules, any _ in the id will be converted to - automatically, so if you have a field whose id is 'edit_node' (this is the field used to provide an "edit" link to a node), it will be 'edit-node'. Additionally, to make sure that the view IDs don't conflict with other css classes in the system, they will be pretended with 'views-field-'; thus, the final CSS class for the field with the id 'edit_node' will be views-field-edit-node. - -Exactly how this appears is going to depend upon the style you're using. For example, the 'unformatted' style uses div.views-field-edit-node and div.views-label-edit-node to access that particular field, but a table would use td.views-field-edit-node and th.views-field-edit-node to access the table header; or just .views-field-edit-node to affect both. - -
-.view-myview th {
-  color: red; /* make all headers red */
-}
-
-.view-myview .views-field-title {
-  font-weight: bold; /* Make the 'title' field bold */
-}
-
-.view-myview td.views-field-body {
-  font-size: 60%; /* Make the text in the body field small */
-}
-
diff --git a/help/top-pager.html b/help/top-pager.html deleted file mode 100644 index 68247af125b..00000000000 --- a/help/top-pager.html +++ /dev/null @@ -1,18 +0,0 @@ -Copy the views-view.tpl.php from the /views/theme directory to themes/yourtheme/theme directory. Find the following code... - - -
-  <?php if ($attachment_before): ?>
-    <div class="attachment-before">
-      <?php print $attachment_before; ?>
-    </div>
-  <?php endif; ?>
-
- -Insert the following code after it (this is copied directly from the same code at the bottom of the tpl): - -
-  <?php if ($pager): ?>
-    <?php print $pager; ?>
-  <?php endif; ?>
-  
diff --git a/help/ui-crashes.html b/help/ui-crashes.html deleted file mode 100644 index 4e8a3893adc..00000000000 --- a/help/ui-crashes.html +++ /dev/null @@ -1,25 +0,0 @@ -

Troubleshooting UI crashes

- -There are a number of reasons why the Views UI may crash; the most common state or result of a crash is either a white screen (everyone's favorite WSOD), or a screen of what looks like garbage text. This is generally a javascript crash of some fashion. - -To get the most timely and accurate help in the issue queue, please try to gather this information: - -Check your javascript console. In Firefox, you can hit ctrl-shift-j or use firebug. Copy this information into the issue, or attach it as a text file. Really - this is the single biggest thing you can do to help figure out where the crash is coming from. - - -

JSON prepends data with jQuery, causing editing and preview problems.

-This section originally stems from this issue. - -Some modules may add PHP improperly, disrupting normal jQuery operation. Errors may look like - - -{ "default": "default" } - - -This can also be a server configuration issue. In one case, this was solved by commenting out - -auto_prepend_file = c:\wamp\www\php.ini.prepend - -in the php.ini. - -Another page to look at is the drupal.org page on White screens diff --git a/help/updating-view3.html b/help/updating-view3.html deleted file mode 100644 index aa2d9770d11..00000000000 --- a/help/updating-view3.html +++ /dev/null @@ -1 +0,0 @@ -Most views should automatically convert without issue. It's always a good idea and highly recommended that all views be exported for backup purposes before upgrading to Views 3.x. diff --git a/help/updating.html b/help/updating.html deleted file mode 100644 index 34a1d253f79..00000000000 --- a/help/updating.html +++ /dev/null @@ -1,7 +0,0 @@ -Views 1 views stored in the database may not convert properly to Views 2. In order to aid with the conversion, a tool is available. In the main Views page, choose Tools -> Convert. Any views you choose will attempt to convert. - -Note that converted Views may not match perfectly! Adjustments may be necessary to retain the integrity of your previous views. - -Views 1 views may also be exported before upgrade, and then imported through the standard Import tab. Those views will attempt to convert during import. Exporting your views before upgrade has the added benefit of ensuring a backup. - -There are no known issues converting views from Views 2 to Views 3 at this time. diff --git a/help/upgrading.html b/help/upgrading.html deleted file mode 100644 index b31b8f931cb..00000000000 --- a/help/upgrading.html +++ /dev/null @@ -1,8 +0,0 @@ - -

Updating templates

-If you have theme files for node-view-$viewname of comment-view-$viewname you have -to convert them to node--view--$viewname or comment--view--$viewname. - -

Updating table templates

-The class variable was renamed to $classes. Additional if you want to add -classes, you should add it to $classes_array and drupal will automatically convert it to the $classes string. diff --git a/help/using-theme.html b/help/using-theme.html deleted file mode 100644 index c4164eb474c..00000000000 --- a/help/using-theme.html +++ /dev/null @@ -1,50 +0,0 @@ -Views theme templates are straightforward to use with the Drupal theming system. If you are unfamiliar with the theming system at all, you should probably at least read drupal.org theming documentation. That said, these are the important things you need to know: - -
    -
  1. Copy a base Views template to one of the names provided from the Theme: Information section of the View. Copy this template right into your theme directory.
  2. -
  3. Clear the theme registry. See the instructions for how to do this.
  4. -
  5. Your new template should now operate; assuming you picked a nicely named template that includes the view name, that template should now be active for your view. A good example is views-view-list--foobar.tpl.php which would work for a view named 'foobar'.
  6. -
  7. You can now modify this template all you like.
  8. -
- -For any template that uses fields, the fields will be in array. In order to use this effectively, you will need to understand enough PHP to fetch data from an array. This is a place where the devel module can really help you, because you can use its dsm() function right in your template to see what variables it uses. There is an alternative to dsm() that works without devel module, but it's a bit longer to use. - -For example, I placed the following code inside a loop in views-view-table.php.php: - <?php drupal_set_message('<pre>' . var_export($row, true) . '</pre>'); ?> - - -And it produced this output: - array ( - 'nid' => '97', - 'title' => 'Scisco Ideo Vicis Feugiat Qui', - 'name' => 'luwrepuslan', - ) - - -My view had three fields: -Node: Nid -Node: Title -User: Name - - -The contents of the $row variable included these fields, in precisely the order that I had arranged them to using the Views rearrange link. Also worth noting, though, is that each field also has an identifier so it can easily be pulled out of the row should I want to display it differently. Using -<?php print $row['title']; ?> - - -Would print just the title for that row. Please remember that I'm doing this inside the loop, so this will get repeated for every row of the view. - -The IDs used to fetch items from the array, id $row['title'] can be quickly and easily looked up on the Theme: Information page. Once a field has been added to the view, its ID will not change, but note that if there are two "title" fields in a view, one will be 'title' and the other will be 'title_1', in order to prevent namespace collisions. - -The important thing here is that Views does provide IDs. Views doesn't tell you what these IDs are, but it's easy to get them by dumping the row data and doing a simple visual inspection. Views does guarantee that these IDs will not change, unless you actually add a new field and remove the existing one (in which case 'title', above, would become 'title_1'). - -

The basic fields template

- -The most common template people will need to rewrite is the "simple" views-view-fields.tpl.php, which is the template used by the Fields row style and all it does is display a simple list of fields. However, it is not that simple to the user. Because the template can't inherently know what the fields are, it has to go through an array in a loop. - -This loop isn't very handy when you really want to have fine control over the template by placing your fields precisely where and how you want. Relax, though; if you know what your fields are, you can rewrite this. If you end up writing your own HTML, the only part that is really important is the content for each field. We know from above that you can get the ID for each field on the Theme: Information page from the view. In the header for the template, we can see that the fields are all in the $fields array, and each field is an object. That leads us to this: - -<?php print $fields['some_id']->content; ?> - -Assuming you replace some_id with an id found on the theme: information page, this code will print the content for that field. You can also get the label and some other data about the field, as well as the raw information. Complete details for what is available are documented directly in views-view-fields.tpl.php. - -Keep in mind that if you rewrite your templates using this, you'll need to maintain this template whenever changes are made to the fields of the view; while this isn't generally recommend, sometimes it's necessary to get the kind of control you might ultimately need. diff --git a/help/view-add.html b/help/view-add.html deleted file mode 100644 index 619d1b66705..00000000000 --- a/help/view-add.html +++ /dev/null @@ -1,25 +0,0 @@ -

When you want to create a new view navigate to Structure > Views . There you can see all the views specified. Fresh install has a few examples ready and you can choose "edit" to investigate how the is made. To create a new view press "Add new view".

- -
- -All the created Views -
- -

You can enter the following information about it.

-

First, you must enter a view name. This is the unique name of the view. It must contain only alphanumeric characters and underscores; it is used to identify the view internally and to generate unique theming template names for this view. If you are overriding a module provided view, the name must not be changed or a new view will be created instead of overriding.

-

You can enter a description of the view. This description will appear on the Views administrative UI to tell you what the view is about. You can enter a view tag. It will be used help sort views on the administrative page.

-You must choose a view type. -
-
Node
-
Nodes are a Drupal site's primary content.
-
Comment
-
When you want to handle comments and information related to the and information related to them.
-
File
-
When you want to handle files and file information.
-
Node revision
-
When you want to handle node revision information, choose this.
-
Term
-
When you want to handle taxonomy, choose this one.
-
User
-
When you want to handle users and user information, choose this one.
-
diff --git a/help/view-settings.html b/help/view-settings.html deleted file mode 100644 index 906656e1991..00000000000 --- a/help/view-settings.html +++ /dev/null @@ -1,5 +0,0 @@ -With the Description and Tag you can set the "View description" and the "View tag". The tag help you to organize your views. Only one tag may be entered for a given view. Note that this tag can also be used in themeing, so do not use words already reserved by Drupal for use, such as "Page". - -You can clone a view. When you click on the clone link on the upper right, all the options in the current view will copy to a new view, which can be given a new name and edited further. - -You can export a view. You can the copy and paste the code from a view into a module or something else. It is a array with all options for that view. diff --git a/help/view-type.html b/help/view-type.html deleted file mode 100644 index bdb80fc0cdf..00000000000 --- a/help/view-type.html +++ /dev/null @@ -1,21 +0,0 @@ -

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.

- -
-
Normal
-
Normal views are stored in your database and are completely local to your system.
- -
Default
-
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
-
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.
-
- -You may store your views in code with the following procedure: -
    -
  1. Create a module to store the views.
  2. -
  3. Add the function MODULENAME_views_default_views() to this module.
  4. -
  5. 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;
  6. -
  7. Make sure the last line of the function is return $views;
  8. -
  9. After you make any changes, be sure to clear the Views' cache. You may do this from the Tools menu.
  10. -
diff --git a/help/views.help.ini b/help/views.help.ini deleted file mode 100644 index bd2d4577af9..00000000000 --- a/help/views.help.ini +++ /dev/null @@ -1,359 +0,0 @@ -[advanced help settings] -line break = TRUE - -[about] -title = "What is Views?" -weight = -50 - -[getting-started] -title = "Getting started" -weight = -40 - -[new] -title = "What's new in Views 3" -weight = -30 - -[example-users-by-role] -title = "Create a page to list users by role" -parent = getting-started -weight = -20 - -[example-recent-stories] -title = "Create a block of recent stories" -parent = getting-started -weight = 0 - -[example-user-feed] -title = "Create an RSS feed of user posts" -parent = getting-started -weight = 30 - -[example-author-block] -title = "Create a block of author's recent blog posts" -parent = getting-started -weight = 40 - - -[view-add] -title = "Add a View" -weight = -10 - -[view-settings] -title = "View settings" -weight = 0 - -[basic-settings] -title = "Basic settings" -weight = 10 - -[advanced-settings] -title= "Advanced settings" -weight = 20 - -[display] -title = "Displays" -weight = -10 - -[display-default] -title = "Default display" -parent = display -weight = -20 - -[display-page] -title = "Page display" -parent = display -weight = -15 - -[display-block] -title = "Block display" -parent = display -weight = -10 - -[display-attachment] -title = "Attachment display" -parent = display - -[display-feed] -title = "Feed display" -parent = display - -[style-settings] -title = "Style settings" -weight = 30 - -[style] -title = "Output styles (View styles)" -parent = style-settings -weight = -20 - -[style-grid] -title = "Grid (output style)" -parent = style -weight = 0 - -[style-list] -title = "HTML List (output style)" -parent = style -weight = 10 - -[style-table] -title = "Table (output style)" -parent = style -weight = 20 - -[style-unformatted] -title = "Unformatted (output style)" -parent = style -weight = 30 - -[style-rss] -title = "RSS output style" -parent = style -weight = 50 - -[style-grouping] -title = "Grouping in styles" -parent = style -weight = -7 - -[style-row] -title = "Row styles" -weight = -10 -parent = style-settings - -[style-jump] -title = "Jump menu output style" -parent = style -weight = -4 - -[style-fields] -title = "Fields" -parent = style-row -weight = -10 - -[style-node] -title = "Node" -parent = style-row -weight = 0 - -[style-node-rss] -title = "Node RSS item row style" -parent = style-row -weight = 10 - -[style-comment-rss] -title = "Comment RSS item row style" -parent = style-row -weight = 20 - -[performance] -title = "Performance" - -[performance-views-vs-displays] -title = "Multiple Views vs Multiple Displays" -parent = performance - -[analyze-theme] -title = "Theme information" -parent = style-settings -weight = 30 - -[using-theme] -title = "Using Views templates" -parent = analyze-theme -weight = 40 - -[theme-css] -title = "Using CSS with Views" -parent = style-settings -weight = 20 - -[advanced-style-settings] -title = "Advanced Style Settings" -parent = style-settings - -[group-by] -title = "Group by" -parent = field - -[menu] -title = "Menu options (page display)" -parent = display-page - -[path] -title = "Path options (page display)" -parent = display-page - -[exposed-form] -title = "Exposed Form" -weight = 45 - -[header] -title = "Header" -weight = 50 - -[footer] -title = "Footer" -weight = 60 - -[empty-text] -title = "Empty Text" -weight = 70 - -[field] -title = "Fields" -weight = 80 - -[relationship] -title = "Relationships" -weight = 90 - -[aggregation] -title = "Aggregation" -weight = 90 - -[argument] -title = "Arguments/Contextual Filters" -weight = 100 - -[style-summary-unformatted] -title = "Summary Style: Unformatted (output style)" -parent = argument - -[style-summary] -title = "Summary Style: List (output style)" -parent = argument - -[sort] -title = "Sort criteria" -weight = 110 - -[filter] -title = "Filters" -weight = 120 - -[overrides] -title = "What are overrides?" -parent = display - -[embed] -title = "Embedding a view into other parts of your site" -weight = 140 - -[upgrading] -title = "Upgrading your Views from Drupal 6 to Drupal 7" - -[updating-view3] -title = "Updating your views from Views 2 to Views 3" -weight = 160 - -[misc-notes] -title = "Known Issues and Workarounds" - -[reports] -title = "Reports" - - -; API related -[api] -title = "Views' API" -weight = 170 - -[api-tables] -title = "Describing tables to Views" -weight = -100 -parent = api - -[api-default-views] -title = "Using default views in your module" -weight = -90 -parent = api - -[api-handlers] -title = "How Views handlers work" -weight = -50 -parent = api - -[api-handler-area] -title = "How to write an area handler" -weight = -40 -parent = api - -[api-plugins] -title = "How Views plugins work" -weight = -40 -parent = api - -[api-forms] -title = "Outputting form elements from handlers" -weight = -30 -parent = api - -[api-upgrading] -title = "Upgrading to Drupal 7 (API)" -parent = api - -[api-example] -title = "Integrating the Node Example module" -parent = api -weight = 100 - -[alter-exposed-filter] -title = "Altering the default value of an exposed filter" -parent = api -weight = 101 - -[get-total-rows] -title = "How to get a total number of rows for a View with a filter and no pager"] -parent = "api" -weight = 102 - -[drush] -title = "Drush commands for Views" -parent = api -weight = 103 - -;Troubleshooting -[troubleshooting] -title = "Troubleshooting tips and gotchas" -weight = 110 - -[ui-crashes] -parent = troubleshooting -title = "UI crashes and whitescreens" -weight = 115 - -;Other places to get help -[other-help] -title = "Other places to get help" -weight = 200 - -[demo-video] -title = "Video demos for Views" -weight = 210 -parent = other-help - -;More examples -[top-pager] -title = "Adding a pager to the top and bottom of a view" -weight = 215 - -[select-multple-nids-contextual-filters] -title = "Selecting multiple nids with contextual filters (arguments)" -weight = 216 - -[taxonomy-page-override] -title = "Overriding the default taxonomy pages with the Taxonomy term view" -weight = 217 - -[only-link-title-for-published-nodes] -title = "A Views field template that creates title links only for published nodes" -weight = 218 - -[example-filter-by-current-user] -title = "Example to filter content by the current logged-in user" -weight = 219 - -[example-slideshow-thumb-pager] -title = "Example to create a slideshow with thumbnails as a pager underneath" -weight = 220