Drupal 6.根据CCK配置文件字段值关联节点

时间:2011-08-31 03:22:04

标签: php drupal-6 views

我正在构建一个drupal 6页面视图,需要根据用户内容配置文件中选择的值显示节点列表。

对不起,如果我不清楚解释事情,经过漫长的一天后我的大脑就会被炸掉:|

要点: 用户从其内容配置文件中的节点引用字段中选择一个值

创建视图页面,其中显示表格中的所有节点,并按配置文件中的特定值进行过滤。

用户无法查看节点引用中其他值的节点。只有他们选择的值

User1 - 已选择高级 User2 - 已选择中间 User3 - 已选择*高级 user4 - 已选择中间 user5 - 已选择初学者

User1,User3能够查看表中的每个其他节点 User2和User4也是如此。用户5只看到提交的一个节点

以下是我参考过的网页: Here但我不使用面板模块(无论如何都不应该重要)

我的观点:

$view = new view;
$view->name = 'AuthorSchedules';
$view->description = '';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
  'field_type_nid' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 0,
    'label_type' => 'custom',
    'format' => 'plain',
    'multiple' => array(
      'group' => 1,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => 0,
    ),
    'exclude' => 0,
    'id' => 'field_type_nid',
    'table' => 'node_data_field_type',
    'field' => 'field_type_nid',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'field_center_local_nid' => array(
    'label' => 'Schedule Details',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 0,
    'label_type' => 'custom',
    'format' => 'plain',
    'multiple' => array(
      'group' => 1,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => 0,
    ),
    'exclude' => 0,
    'id' => 'field_center_local_nid',
    'table' => 'node_data_field_center_local',
    'field' => 'field_center_local_nid',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'field_name_value' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 1,
    'id' => 'field_name_value',
    'table' => 'node_data_field_name',
    'field' => 'field_name_value',
    'relationship' => 'none',
  ),
  'field_last_name_value' => array(
    'label' => 'Trainer',
    'alter' => array(
      'alter_text' => 1,
      'text' => '[field_name_value] [field_last_name_value] ',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 0,
    'label_type' => 'custom',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_last_name_value',
    'table' => 'node_data_field_last_name',
    'field' => 'field_last_name_value',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'created' => array(
    'label' => 'Post date',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'date_format' => 'custom',
    'custom_date_format' => 'm-d-y',
    'exclude' => 0,
    'id' => 'created',
    'table' => 'node',
    'field' => 'created',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('arguments', array(
  'field_org_ref_select_nid' => array(
    'default_action' => 'default',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '',
    'breadcrumb' => '',
    'default_argument_type' => 'php',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'not found',
    'break_phrase' => 0,
    'not' => 0,
    'id' => 'field_org_ref_select_nid',
    'table' => 'node_data_field_org_ref_select',
    'field' => 'field_org_ref_select_nid',
    'validate_user_argument_type' => 'uid',
    'validate_user_roles' => array(
      '2' => 0,
      '4' => 0,
      '6' => 0,
      '5' => 0,
      '3' => 0,
    ),
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_fixed' => '',
    'default_argument_user' => 0,
    'default_argument_php' => '$userid = arg(1);
$content_profile = content_profile_load(\'profile\', $userid);
$content_profile_nid = $content_profile->nid;
$node_ref = node_load($content_profile_nid);
$refnid = $node_ref->field_org_ref_select[0][\'nid\'];
return $refnid;',
    'validate_argument_node_type' => array(
      'profile' => 'profile',
      'center_location' => 0,
      'organization' => 0,
      'page' => 0,
      'story' => 0,
      'type' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '1' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_transform' => 0,
    'validate_user_restrict_roles' => 0,
    'validate_argument_php' => '',
  ),
  'nid' => array(
    'default_action' => 'default',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '',
    'breadcrumb' => '',
    'default_argument_type' => 'php',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'ignore',
    'break_phrase' => 0,
    'not' => 1,
    'id' => 'nid',
    'table' => 'node',
    'field' => 'nid',
    'validate_user_argument_type' => 'uid',
    'validate_user_roles' => array(
      '2' => 0,
      '4' => 0,
      '6' => 0,
      '5' => 0,
      '3' => 0,
    ),
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_fixed' => '',
    'default_argument_user' => 0,
    'default_argument_php' => '$userid = arg(1);
$content_profile = content_profile_load(\'profile\', $userid);
$content_profile_nid = $content_profile->nid;
if($content_profile_nid) {
return $content_profile_nid;
}
return false;',
    'validate_argument_node_type' => array(
      'center_location' => 0,
      'organization' => 0,
      'page' => 0,
      'profile' => 0,
      'story' => 0,
      'type' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '1' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_transform' => 0,
    'validate_user_restrict_roles' => 0,
    'validate_argument_php' => '',
  ),
));
$handler->override_option('access', array(
  'type' => 'role',
  'role' => array(
    '3' => 3,
  ),
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('header', '<h1>Your Training Schedules</h1>');
$handler->override_option('header_format', '2');
$handler->override_option('header_empty', 0);
$handler->override_option('use_ajax', TRUE);
$handler->override_option('items_per_page', 25);
$handler->override_option('use_pager', 'mini');
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
  'grouping' => '',
  'override' => 1,
  'sticky' => 0,
  'order' => 'asc',
  'columns' => array(
    'field_type_nid' => 'field_type_nid',
    'field_center_local_nid' => 'field_center_local_nid',
    'field_name_value' => 'field_name_value',
    'field_last_name_value' => 'field_last_name_value',
    'created' => 'created',
  ),
  'info' => array(
    'field_type_nid' => array(
      'separator' => '',
    ),
    'field_center_local_nid' => array(
      'separator' => '',
    ),
    'field_name_value' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'field_last_name_value' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'created' => array(
      'sortable' => 1,
      'separator' => '',
    ),
  ),
  'default' => '-1',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'schedules_author');
$handler->override_option('menu', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));

如果有任何不清楚的地方,请告诉我。我非常感谢你的帮助。

1 个答案:

答案 0 :(得分:0)

您正在使用应该接受参数的视图,然后使用该参数进行过滤。节点参考位应该是无关紧要的。视图需要在内容类型之间建立关系。也许这个例子将会阐明。

在我的域名中,我有教授教授发布出版物并拥有研究兴趣。在查看教授的个人资料(使用内容简介)时,我希望获得能够提升所有相关出版物和研究兴趣的观点。

例如:Faculty profile 以下是出版物视图的内容:

$view = new view;
$view->name = 'publications';
$view->description = 'a view for publications';
$view->tag = '';
$view->base_table = 'node';
$view->human_name = '';
$view->core = 0;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Defaults */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->display->display_options['use_ajax'] = TRUE;
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['style_plugin'] = 'list';
$handler->display->display_options['row_plugin'] = 'fields';
$handler->display->display_options['row_options']['inline'] = array(
'field_authors_value' => 'field_authors_value',
'field_year_value' => 'field_year_value',
'title' => 'title',
'field_journal_value' => 'field_journal_value',
'field_volume_value' => 'field_volume_value',
'field_pages_value' => 'field_pages_value',
);
$handler->display->display_options['row_options']['separator'] = '.';
$handler->display->display_options['row_options']['hide_empty'] = 0;
/* Relationship: Content: Owner (field_owner) */
$handler->display->display_options['relationships']['field_owner_uid']['id'] = 'field_owner_uid';
$handler->display->display_options['relationships']['field_owner_uid']['table'] = 'node_data_field_owner';
$handler->display->display_options['relationships']['field_owner_uid']['field'] = 'field_owner_uid';
$handler->display->display_options['relationships']['field_owner_uid']['required'] = 0;
$handler->display->display_options['relationships']['field_owner_uid']['delta'] = '-1';
/* Relationship: Node: Content Profile */
$handler->display->display_options['relationships']['content_profile_rel']['id'] = 'content_profile_rel';
$handler->display->display_options['relationships']['content_profile_rel']['table'] = 'users';
$handler->display->display_options['relationships']['content_profile_rel']['field'] = 'content_profile_rel';
$handler->display->display_options['relationships']['content_profile_rel']['relationship'] = 'field_owner_uid';
$handler->display->display_options['relationships']['content_profile_rel']['required'] = 0;
$handler->display->display_options['relationships']['content_profile_rel']['type'] = 'profile';
/* Field: Content: Authors (field_authors) */
$handler->display->display_options['fields']['field_authors_value']['id'] = 'field_authors_value';
$handler->display->display_options['fields']['field_authors_value']['table'] = 'node_data_field_authors';
$handler->display->display_options['fields']['field_authors_value']['field'] = 'field_authors_value';
$handler->display->display_options['fields']['field_authors_value']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_authors_value']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_authors_value']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_authors_value']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_authors_value']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_authors_value']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_authors_value']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_authors_value']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_authors_value']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_authors_value']['link_to_node'] = 0;
$handler->display->display_options['fields']['field_authors_value']['label_type'] = 'none';
/* Field: Content: Year (field_year) */
$handler->display->display_options['fields']['field_year_value']['id'] = 'field_year_value';
$handler->display->display_options['fields']['field_year_value']['table'] = 'node_data_field_year';
$handler->display->display_options['fields']['field_year_value']['field'] = 'field_year_value';
$handler->display->display_options['fields']['field_year_value']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_year_value']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_year_value']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_year_value']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_year_value']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_year_value']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_year_value']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_year_value']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_year_value']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_year_value']['link_to_node'] = 0;
$handler->display->display_options['fields']['field_year_value']['label_type'] = 'none';
/* Field: Node: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Field: Content: Journal (field_journal) */
$handler->display->display_options['fields']['field_journal_value']['id'] = 'field_journal_value';
$handler->display->display_options['fields']['field_journal_value']['table'] = 'node_data_field_journal';
$handler->display->display_options['fields']['field_journal_value']['field'] = 'field_journal_value';
$handler->display->display_options['fields']['field_journal_value']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_journal_value']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_journal_value']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_journal_value']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_journal_value']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_journal_value']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_journal_value']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_journal_value']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_journal_value']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_journal_value']['link_to_node'] = 0;
$handler->display->display_options['fields']['field_journal_value']['label_type'] = 'none';
/* Field: Content: Volume (field_volume) */
$handler->display->display_options['fields']['field_volume_value']['id'] = 'field_volume_value';
$handler->display->display_options['fields']['field_volume_value']['table'] = 'node_data_field_volume';
$handler->display->display_options['fields']['field_volume_value']['field'] = 'field_volume_value';
$handler->display->display_options['fields']['field_volume_value']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_volume_value']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_volume_value']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_volume_value']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_volume_value']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_volume_value']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_volume_value']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_volume_value']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_volume_value']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_volume_value']['link_to_node'] = 0;
$handler->display->display_options['fields']['field_volume_value']['label_type'] = 'none';
/* Field: Content: Page(s) (field_pages) */
$handler->display->display_options['fields']['field_pages_value']['id'] = 'field_pages_value';
$handler->display->display_options['fields']['field_pages_value']['table'] = 'node_data_field_pages';
$handler->display->display_options['fields']['field_pages_value']['field'] = 'field_pages_value';
$handler->display->display_options['fields']['field_pages_value']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_pages_value']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_pages_value']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_pages_value']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_pages_value']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_pages_value']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_pages_value']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_pages_value']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_pages_value']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_pages_value']['link_to_node'] = 0;
$handler->display->display_options['fields']['field_pages_value']['label_type'] = 'none';
/* Field: Content: Home Page (field_url) */
$handler->display->display_options['fields']['field_url_url']['id'] = 'field_url_url';
$handler->display->display_options['fields']['field_url_url']['table'] = 'node_data_field_url';
$handler->display->display_options['fields']['field_url_url']['field'] = 'field_url_url';
$handler->display->display_options['fields']['field_url_url']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_url_url']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_url_url']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_url_url']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_url_url']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_url_url']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_url_url']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_url_url']['hide_empty'] = 1;
$handler->display->display_options['fields']['field_url_url']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_url_url']['link_to_node'] = 0;
$handler->display->display_options['fields']['field_url_url']['label_type'] = 'none';
$handler->display->display_options['fields']['field_url_url']['format'] = 'url';
/* Field: Content: File (field_publication_file) */
$handler->display->display_options['fields']['field_publication_file_fid']['id'] = 'field_publication_file_fid';
$handler->display->display_options['fields']['field_publication_file_fid']['table'] = 'node_data_field_publication_file';
$handler->display->display_options['fields']['field_publication_file_fid']['field'] = 'field_publication_file_fid';
$handler->display->display_options['fields']['field_publication_file_fid']['label'] = 'File';
$handler->display->display_options['fields']['field_publication_file_fid']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_publication_file_fid']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_publication_file_fid']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_publication_file_fid']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_publication_file_fid']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_publication_file_fid']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_publication_file_fid']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_publication_file_fid']['hide_empty'] = 1;
$handler->display->display_options['fields']['field_publication_file_fid']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_publication_file_fid']['link_to_node'] = 0;
$handler->display->display_options['fields']['field_publication_file_fid']['multiple']['group'] = 1;
$handler->display->display_options['fields']['field_publication_file_fid']['multiple']['multiple_reversed'] = 0;
/* Field: Node: Title */
$handler->display->display_options['fields']['title_1']['id'] = 'title_1';
$handler->display->display_options['fields']['title_1']['table'] = 'node';
$handler->display->display_options['fields']['title_1']['field'] = 'title';
$handler->display->display_options['fields']['title_1']['relationship'] = 'content_profile_rel';
$handler->display->display_options['fields']['title_1']['label'] = 'Owner';
$handler->display->display_options['fields']['title_1']['exclude'] = TRUE;
$handler->display->display_options['fields']['title_1']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title_1']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title_1']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['title_1']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['title_1']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title_1']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title_1']['alter']['html'] = 0;
$handler->display->display_options['fields']['title_1']['hide_empty'] = 0;
$handler->display->display_options['fields']['title_1']['empty_zero'] = 0;
$handler->display->display_options['fields']['title_1']['link_to_node'] = 1;
/* Sort criterion: Content: Year (field_year) */
$handler->display->display_options['sorts']['field_year_value']['id'] = 'field_year_value';
$handler->display->display_options['sorts']['field_year_value']['table'] = 'node_data_field_year';
$handler->display->display_options['sorts']['field_year_value']['field'] = 'field_year_value';
$handler->display->display_options['sorts']['field_year_value']['order'] = 'DESC';
/* Argument: Content: Owner (field_owner) */
$handler->display->display_options['arguments']['field_owner_uid']['id'] = 'field_owner_uid';
$handler->display->display_options['arguments']['field_owner_uid']['table'] = 'node_data_field_owner';
$handler->display->display_options['arguments']['field_owner_uid']['field'] = 'field_owner_uid';
$handler->display->display_options['arguments']['field_owner_uid']['style_plugin'] = 'default_summary';
$handler->display->display_options['arguments']['field_owner_uid']['default_argument_type'] = 'fixed';
/* Filter: Node: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'publication' => 'publication',
);
$handler->display->display_options['filters']['type']['expose']['operator'] = FALSE;

这在其他范例中要简单得多,而且这段代码中有很多噪音(与Drupal合作的部分内容),但我希望你能得到一般意义。