views_nodes_split.module in Views nodes split 6
Same filename and directory in other branches
Implements a views row plugin that can display the first nodes in a result using a different view mode.
File
views_nodes_split.moduleView source
<?php
/**
* @file
* Implements a views row plugin that can display the first nodes in a result
* using a different view mode.
*/
/**
* Implements hook_views_api().
*/
function views_nodes_split_views_api() {
return array(
'api' => 2,
);
}
/**
* Implements hook_views_plugins().
*/
function views_nodes_split_views_plugins() {
return array(
'module' => 'views',
// This just tells our themes are elsewhere.
'row' => array(
'node_split' => array(
'title' => t('Node with different build modes'),
'help' => t('Display the content with standard node view, but the first nodes can have different view modes.'),
'handler' => 'views_plugin_row_node_view_split',
'path' => drupal_get_path('module', 'views_nodes_split') . '/plugins',
'theme' => 'views_view_row_node',
'base' => array(
'node',
),
// only works with 'node' as base.
'uses options' => TRUE,
'type' => 'normal',
'parent' => 'views_plugin_row_node_view',
),
),
'argument validator' => array(
'node' => array(
'title' => t('Node'),
'handler' => 'views_plugin_argument_validate_node',
'path' => drupal_get_path('module', 'views') . '/modules/node',
),
),
'argument default' => array(
'node' => array(
'title' => t('Node ID from URL'),
'handler' => 'views_plugin_argument_default_node',
'path' => drupal_get_path('module', 'views') . '/modules/node',
'parent' => 'fixed',
),
),
);
}
Functions
Name![]() |
Description |
---|---|
views_nodes_split_views_api | Implements hook_views_api(). |
views_nodes_split_views_plugins | Implements hook_views_plugins(). |