Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $view = new view;
- $view->name = 'candidates';
- $view->description = 'Table view of candidates';
- $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('relationships', array(
- 'term_node_tid' => array(
- 'label' => 'Election Year',
- 'required' => 1,
- 'vids' => array(
- '2' => 2,
- '6' => 0,
- '4' => 0,
- '1' => 0,
- '3' => 0,
- '9' => 0,
- '7' => 0,
- ),
- 'id' => 'term_node_tid',
- 'table' => 'node',
- 'field' => 'term_node_tid',
- 'relationship' => 'none',
- ),
- 'term_node_tid_1' => array(
- 'label' => 'Office Type',
- 'required' => 1,
- 'vids' => array(
- '1' => 1,
- '6' => 0,
- '4' => 0,
- '2' => 0,
- '3' => 0,
- '9' => 0,
- '7' => 0,
- ),
- 'id' => 'term_node_tid_1',
- 'table' => 'node',
- 'field' => 'term_node_tid',
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('fields', array(
- 'field_first_value' => array(
- 'label' => 'First Name',
- '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' => 'widget',
- 'format' => 'default',
- 'multiple' => array(
- 'group' => TRUE,
- 'multiple_number' => '',
- 'multiple_from' => '',
- 'multiple_reversed' => FALSE,
- ),
- 'exclude' => 1,
- 'id' => 'field_first_value',
- 'table' => 'node_data_field_first',
- 'field' => 'field_first_value',
- 'relationship' => 'none',
- ),
- 'title' => array(
- 'label' => 'Name',
- 'alter' => array(
- 'alter_text' => 1,
- 'text' => '<span class="name">[field_first_value] [title]</span>',
- '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' => 1,
- 'exclude' => 0,
- 'id' => 'title',
- 'table' => 'node',
- 'field' => 'title',
- 'relationship' => 'none',
- 'override' => array(
- 'button' => 'Override',
- ),
- ),
- 'field_office_value' => array(
- 'id' => 'field_office_value',
- 'table' => 'node_data_field_office',
- 'field' => 'field_office_value',
- ),
- 'tid_1' => array(
- 'label' => 'Office Type',
- '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,
- 'type' => 'separator',
- 'separator' => ', ',
- 'link_to_taxonomy' => 1,
- 'limit' => 1,
- 'vids' => array(
- '1' => 1,
- '6' => 0,
- '4' => 0,
- '2' => 0,
- '3' => 0,
- '9' => 0,
- '7' => 0,
- ),
- 'exclude' => 0,
- 'id' => 'tid_1',
- 'table' => 'term_node',
- 'field' => 'tid',
- 'relationship' => 'none',
- ),
- 'tid' => array(
- 'label' => 'Election Year',
- '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,
- 'type' => 'separator',
- 'separator' => ', ',
- 'link_to_taxonomy' => 1,
- 'limit' => 1,
- 'vids' => array(
- '2' => 2,
- '6' => 0,
- '4' => 0,
- '1' => 0,
- '3' => 0,
- '9' => 0,
- '7' => 0,
- ),
- 'exclude' => 1,
- 'id' => 'tid',
- 'table' => 'term_node',
- 'field' => 'tid',
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('sorts', array(
- 'weight' => array(
- 'order' => 'ASC',
- 'id' => 'weight',
- 'table' => 'term_data',
- 'field' => 'weight',
- 'override' => array(
- 'button' => 'Override',
- ),
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('filters', array(
- 'status' => array(
- 'operator' => '=',
- 'value' => '1',
- 'group' => '0',
- 'exposed' => FALSE,
- 'expose' => array(
- 'operator' => FALSE,
- 'label' => '',
- ),
- 'id' => 'status',
- 'table' => 'node',
- 'field' => 'status',
- 'relationship' => 'none',
- ),
- 'type' => array(
- 'operator' => 'in',
- 'value' => array(
- 'candidate' => 'candidate',
- ),
- 'group' => '0',
- 'exposed' => FALSE,
- 'expose' => array(
- 'operator' => FALSE,
- 'label' => '',
- ),
- 'id' => 'type',
- 'table' => 'node',
- 'field' => 'type',
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('access', array(
- 'type' => 'none',
- ));
- $handler->override_option('cache', array(
- 'type' => 'none',
- ));
- $handler->override_option('items_per_page', 0);
- $handler->override_option('distinct', 1);
- $handler->override_option('style_plugin', 'table');
- $handler->override_option('style_options', array(
- 'grouping' => 'tid',
- 'override' => 1,
- 'sticky' => 0,
- 'order' => 'asc',
- 'columns' => array(
- 'title' => 'title',
- 'field_office_value' => 'field_office_value',
- 'tid' => 'tid',
- ),
- 'info' => array(
- 'title' => array(
- 'sortable' => 0,
- 'separator' => '',
- ),
- 'field_office_value' => array(
- 'sortable' => 0,
- 'separator' => '',
- ),
- 'tid' => array(
- 'separator' => '',
- ),
- ),
- 'default' => '-1',
- ));
- $handler = $view->new_display('page', 'Page', 'page_1');
- $handler->override_option('path', 'candidates');
- $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',
- ));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement