1

テーブルにコンテンツを表示するビューがあります (約 30 行)。用語を 1 つの行に割り当てました (この例では、語彙 = ハイライト、用語 = はい)。私がやりたいことは、強調表示された行の上と下の 2 つの結果のみを表示することです。

行 1 ~ 3 は表示されません

~~~~~~~~~~~~~~~~~~~~~~~~

行 4

行 5

行 6 (強調表示 = はい)

行 7

行 8

~~~~~~~~~~~~~~~~~~~~~~~~

行 9-X は表示されません

どうすればこれを行うことができますか?

ありがとう、

S

編集:

以下のエクスポートを表示:

$view = new view;
$view->name = 'league_cup_table_teaser';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'League/cup table teaser';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'League/cup table teaser';
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
$handler->display->display_options['row_options']['hide_empty'] = 0;
$handler->display->display_options['row_options']['default_field_elements'] = 0;
/* Field: Content: 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']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['external'] = 0;
$handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['title']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['title']['alter']['more_link'] = 0;
$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']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['title']['element_wrapper_type'] = 'h2';
$handler->display->display_options['fields']['title']['element_default_classes'] = 1;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['title']['link_to_node'] = 0;
/* Field: Content: Teams */
$handler->display->display_options['fields']['field_teams']['id'] = 'field_teams';
$handler->display->display_options['fields']['field_teams']['table'] = 'field_data_field_teams';
$handler->display->display_options['fields']['field_teams']['field'] = 'field_teams';
$handler->display->display_options['fields']['field_teams']['label'] = '';
$handler->display->display_options['fields']['field_teams']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_teams']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_teams']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_teams']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_teams']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_teams']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_teams']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_teams']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_teams']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_teams']['alter']['more_link'] = 0;
$handler->display->display_options['fields']['field_teams']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_teams']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_teams']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_teams']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_teams']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_teams']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_teams']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_teams']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['field_teams']['type'] = 'field_collection_views_view';
$handler->display->display_options['fields']['field_teams']['settings'] = array(
  'name' => 'field_collection_league_cup_table_teaser',
  'display_id' => 'default',
  'add' => '',
);
$handler->display->display_options['fields']['field_teams']['group_rows'] = 1;
$handler->display->display_options['fields']['field_teams']['delta_offset'] = '0';
$handler->display->display_options['fields']['field_teams']['delta_reversed'] = 0;
$handler->display->display_options['fields']['field_teams']['delta_first_last'] = 0;
$handler->display->display_options['fields']['field_teams']['field_api_classes'] = 0;
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Content: 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(
  'table' => 'table',
);
/* Filter criterion: Content: Promoted to front page */
$handler->display->display_options['filters']['promote']['id'] = 'promote';
$handler->display->display_options['filters']['promote']['table'] = 'node';
$handler->display->display_options['filters']['promote']['field'] = 'promote';
$handler->display->display_options['filters']['promote']['value'] = '1';

/* Display: Block */
$handler = $view->new_display('block', 'Block', 'block');
4

1 に答える 1

0

これを行うには、jQuery のレイヤーを追加します。おそらく純粋なビューを使用するほどエレガントではありませんが、それでも...

HTML テーブルの一部を動的に非表示にする

デモ: http://jsbin.com/ahigi/1/edit

S

于 2012-07-28T13:44:15.520 に答える