function _views_ui_help_add in Views (for Drupal 7) 5
1 call to _views_ui_help_add()
File
- ./
views_ui.module, line 32
Code
function _views_ui_help_add() {
$output = t('<p>A view retrieves some number of nodes from the database and displays them in a variety of formats.</p>');
$output .= t("<h3>View Types</h3>\n <dl>\n <dt><em>List View</em></dt><dd>A List View provides the data for each node retrieved in the form of an unordered list. Each item in the Fields section will be displayed; the Title will be displayed as a label. The order the items appear in the Fields list is the order the items will appear in the output. Leaving the title blank will cause the field to appear with no label (which is desirable in lists that just display titles, for example).</dd>\n <dt><em>Table View</em></dt><dd>A Table View provides the data for each node as one row of a table. The Fields selected in the Fields list will be displayed in the order they are listed. The title column will be shown in the header. If you set the field to 'sortable' then the header will be click-sortable; be careful here as click-sorts will be processed after built-in sort criteria, and built-in sort criteria can easily make click-sorts invalid. If using click-sorts, choose a field to be the default sort; otherwise the first field presented will be the default sort.</dd>\n <dt><em>Teaser List</em></dt><dd>A Teaser List will simply present the teaser of each node retrieved.</dd>\n <dt><em>Full Nodes</em></dt><dd>This will show the full content of each node retrieved.</dd>\n <dt><em>Random Teaser</em></dt><dd>This will show a single random teaser.</dd>\n <dt><em>Random Node</em></dt><dd>This will show a single random node's full view.</dd>\n </dl>");
views_load_cache();
$output .= t("<h3>Fields</h3>\n");
$output .= t("<p>When using List or Table view, it is necessary to choose which fields will be displayed to the user.</p><dl>\n");
$fields = _views_get_fields();
foreach ($fields as $field) {
$output .= "<dt><em>{$field['name']}</em></dt><dd>{$field['help']}</dd>\n";
}
$output .= "</dl>\n";
$output .= t("<h3>Arguments</h3>\n");
$output .= t("<p>Arguments can be passed to the View through the URL, in order to create views that are configurable by the user. This is very useful to create views for taxonomy, or to sort by user. When using arguments, substitution is performed on the title. %1 will represent argument 1, %2 will represent argument 2. Each argument has a title field; this title is used if providing a summary view (which can matter because the argument is missing which could result in confusing phrases such as 'view for')</p><dl>\n");
$arguments = _views_get_arguments();
foreach ($arguments as $argument) {
$output .= "<dt><em>{$argument['name']}</em></dt><dd>{$argument['help']}</dd>\n";
}
$output .= "</dl>\n";
$output .= t("<h3>Filters</h3>\n");
$output .= t("<p>Views may be filtered to restrict the view on a number of criteria.</p><dl>\n");
$filters = _views_get_filters();
foreach ($filters as $filter) {
$output .= "<dt><em>{$filter['name']}</em></dt><dd>{$filter['help']}</dd>\n";
}
$output .= "</dl>\n";
$output .= t("<h3>Sorting Critera</h3>\n");
$output .= t("<p>The result set may be sorted on any of the following criteria.</p><dl>\n");
$sorts = _views_get_sorts();
foreach ($sorts as $sort) {
$output .= "<dt><em>{$sort['name']}</em></dt><dd>{$sort['help']}</dd>\n";
}
$output .= "</dl>\n";
return $output;
}