$view = new view; $view->name = 'term_latest'; $view->description = ''; $view->tag = ''; $view->view_php = ''; $view->base_table = 'term_data'; $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( 'tid' => array( 'label' => 'Representative node', 'required' => 0, 'subquery_sort' => 'node.created', 'subquery_order' => 'DESC', 'id' => 'tid', 'table' => 'term_data', 'field' => 'tid', 'subquery_string' => 'SELECT node.nid AS nid FROM {node} node INNER JOIN {term_node} term_node ON node.vid = term_node.vid WHERE term_node.tid = term_data.tid ORDER BY node.created DESC LIMIT 1', 'relationship' => 'none', ), )); $handler->override_option('fields', array( 'name' => array( 'label' => 'Term', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'link_to_taxonomy' => 0, 'exclude' => 0, 'id' => 'name', 'table' => 'term_data', 'field' => 'name', 'relationship' => 'none', ), 'tid' => array( 'label' => 'Term ID', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'set_precision' => FALSE, 'precision' => 0, 'decimal' => '.', 'separator' => ',', 'prefix' => '', 'suffix' => '', 'exclude' => 0, 'id' => 'tid', 'table' => 'term_data', 'field' => 'tid', 'relationship' => 'none', ), 'nid' => array( 'label' => 'Nid', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'link_to_node' => 0, 'exclude' => 0, 'id' => 'nid', 'table' => 'node', 'field' => 'nid', 'relationship' => 'tid', ), 'title' => array( 'label' => 'Title', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'link_to_node' => 0, 'exclude' => 0, 'id' => 'title', 'table' => 'node', 'field' => 'title', 'relationship' => 'tid', ), )); $handler->override_option('access', array( 'type' => 'none', )); $handler->override_option('cache', array( 'type' => 'none', )); $handler->override_option('style_plugin', 'table'); $handler->override_option('style_options', array( 'grouping' => '', 'override' => 1, 'sticky' => 0, 'order' => 'asc', 'columns' => array( 'name' => 'name', 'tid' => 'tid', 'nid' => 'nid', 'title' => 'title', ), 'info' => array( 'name' => array( 'sortable' => 0, 'separator' => '', ), 'tid' => array( 'sortable' => 0, 'separator' => '', ), 'nid' => array( 'sortable' => 0, 'separator' => '', ), 'title' => array( 'sortable' => 0, 'separator' => '', ), ), 'default' => '-1', ));