$view = new view; $view->name = 'courses'; $view->description = 'list courses; relationship with organisation'; $view->tag = 'courses'; $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( 'field_course_organisation_nid' => array( 'label' => 'Organisation', 'required' => 1, 'delta' => -1, 'id' => 'field_course_organisation_nid', 'table' => 'node_data_field_course_organisation', 'field' => 'field_course_organisation_nid', 'override' => array( 'button' => 'Override', ), 'relationship' => 'none', ), )); $handler->override_option('fields', array( 'title' => array( 'label' => 'Course title', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'link_to_node' => 1, 'exclude' => 0, 'id' => 'title', 'table' => 'node', 'field' => 'title', 'override' => array( 'button' => 'Override', ), 'relationship' => 'none', ), 'title_1' => array( 'label' => 'Organisation', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'link_to_node' => 1, 'exclude' => 0, 'id' => 'title_1', 'table' => 'node', 'field' => 'title', 'override' => array( 'button' => 'Override', ), 'relationship' => 'field_course_organisation_nid', ), )); $handler->override_option('filters', array( 'type' => array( 'operator' => 'in', 'value' => array( 'course' => 'course', ), 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'type', 'table' => 'node', 'field' => 'type', 'override' => array( 'button' => 'Override', ), 'relationship' => 'none', ), 'field_course_organisation_nid' => array( 'operator' => 'or', 'value' => array( '14' => '14', '15' => '15', '16' => '16', ), 'group' => '0', 'exposed' => TRUE, 'expose' => array( 'use_operator' => 0, 'operator' => 'field_course_organisation_nid_op', 'identifier' => 'field_course_organisation_nid', 'label' => 'Content: Organisation (field_course_organisation)', 'optional' => 1, 'single' => 0, 'remember' => 0, 'reduce' => 0, ), 'id' => 'field_course_organisation_nid', 'table' => 'node_data_field_course_organisation', 'field' => 'field_course_organisation_nid', 'override' => array( 'button' => 'Override', ), 'relationship' => 'field_course_organisation_nid', 'reduce_duplicates' => 0, ), )); $handler->override_option('access', array( 'type' => 'none', )); $handler->override_option('empty', 'query yielded no results'); $handler->override_option('empty_format', '1'); $handler->override_option('style_plugin', 'table'); $handler->override_option('style_options', array( 'grouping' => '', 'override' => 1, 'sticky' => 0, 'order' => 'asc', 'columns' => array( 'title' => 'title', 'title_1' => 'title_1', ), 'info' => array( 'title' => array( 'sortable' => 0, 'separator' => '', ), 'title_1' => array( 'sortable' => 0, 'separator' => '', ), ), 'default' => '-1', )); $handler = $view->new_display('page', 'Page', 'page_1'); $handler->override_option('path', 'courses'); $handler->override_option('menu', array( 'type' => 'normal', 'title' => 'Courses', 'description' => '', 'weight' => '0', 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, ));