<!-- $Id$ -->
-@todo text needed
\ No newline at end of file
+Fields are the individual pieces of data being displayed. Adding the fields <em>Node: Title</em>, <em>Node: Type</em>, and <em>Node: Post date</em> 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.
\ No newline at end of file
<!-- $Id$ -->
-@todo text needed
\ No newline at end of file
+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:
+<ul>
+<li> The 'Node: Published' filter is used to restrict a node View to only nodes that are are have the 'published' box checked. This can be very important to prevent users from viewing content they should not have access to.</li>
+<li> The 'Node: Promoted to front page' filter can be used to show only nodes that have the 'promote to front page' turned on. </li>
+<li> The 'Node: Type' filter is useful for showing only certain types of nodes. Let's say you wanted users to see only nodes that were 'book' nodes, or a combination of 'book' nodes and 'staff-blog' nodes. This filter allows you to select exactly that.</li>
+<li> The 'User: Current' filter will show only nodes that the logged in user has authored.</li>
+<li> The 'Node: Post date' filter can be used to show only nodes posted before, after, or between a range of dates.
+</ul>
+
+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.
\ No newline at end of file
break;
case 'analyze-theme-display':
$form['#title'] .= t('Theming information (display)');
- $output = '';
+ $output = '<p>' . t('Back to !info.', array('!info' => $this->option_link(t('theming information'), 'analyze-theme'))) . '</p>';
if (empty($this->definition['theme'])) {
$output .= t('This display has no theming information');
break;
case 'analyze-theme-style':
$form['#title'] .= t('Theming information (style)');
- $output = '';
+ $output = '<p>' . t('Back to !info.', array('!info' => $this->option_link(t('theming information'), 'analyze-theme'))) . '</p>';
$plugin = $this->get_plugin();
break;
case 'analyze-theme-row':
$form['#title'] .= t('Theming information (row style)');
- $output = '';
+ $output = '<p>' . t('Back to !info.', array('!info' => $this->option_link(t('theming information'), 'analyze-theme'))) . '</p>';
$plugin = $this->get_plugin('row');
break;
case 'analyze-theme-field':
$form['#title'] .= t('Theming information (row style)');
- $output = '';
+ $output = '<p>' . t('Back to !info.', array('!info' => $this->option_link(t('theming information'), 'analyze-theme'))) . '</p>';
$output .= '<p>' . t('This is the default theme template used for this row style.') . '</p>';
$template = "<?php\n";
'#title' => t('Override normal sorting if click sorting is used'),
'#default_value' => !empty($this->options['override']),
);
-
+
$form['sticky'] = array(
'#type' => 'checkbox',
'#title' => t('Enable Drupal style "sticky" table headers (Javascript)'),
// For other base tables, explain how we join
$data['node']['table']['join'] = array(
// this explains how the 'node' table (named in the line above)
- // links toward the users table.
- 'users' => array(
+ // links toward the node_revisions table.
+ 'node_revisions' => array(
'handler' => 'views_join', // this is actually optional
- 'left_table' => 'users', // Because this is a direct link it could be left out.
- 'left_field' => 'uid',
- 'field' => 'uid',
+ 'left_table' => 'node_revisions', // Because this is a direct link it could be left out.
+ 'left_field' => 'nid',
+ 'field' => 'nid',
// also supported:
// 'type' => 'INNER',
// 'extra' => array(array('field' => 'fieldname', 'value' => 'value', 'operator' => '='))
- // Unfortunately, you can't specify other tables here, but you can construct
- // alternative joins in the handlers that can do that.
+ // Unfortunately, you can't specify other tables here, but you can construct
+ // alternative joins in the handlers that can do that.
// 'table' => 'the actual name of this table in the database',
),
- 'node_revisions' => array(
- // We link directly to node_revisions so we don't have to specify it.'
- 'left_field' => 'nid',
- 'field' => 'nid',
- ),
);
// ----------------------------------------------------------------
'left_field' => 'vid',
'field' => 'vid',
),
- // Links to user table through node table.
- 'users' => array(
- // Since it doesn't link to the user table, we must specify
- 'left_table' => 'node',
- 'left_field' => 'vid',
- 'field' => 'vid',
+ );
+
+ // uid field
+ $data['node_revisions']['uid'] = array(
+ 'title' => t('User'),
+ 'help' => t('Relate a node revision to the user who created the revision.'),
+ 'relationship' => array(
+ 'handler' => 'views_handler_relationship',
+ 'base' => 'users',
+ 'field' => 'uid',
+ 'label' => t('user'),
),
);
'left_field' => 'uid',
'field' => 'uid',
),
- // This will be the revision author, not the node author.
+ // This goes to the node so that we have consistent authorship.
'node_revisions' => array(
'left_field' => 'uid',
'field' => 'uid',