Fix for Term-View

  1. $view = new view;
  2. $view->name = 'terms';
  3. $view->description = '';
  4. $view->tag = '';
  5. $view->view_php = '';
  6. $view->base_table = 'term_data';
  7. $view->is_cacheable = FALSE;
  8. $view->api_version = 2;
  9. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  10. $handler = $view->new_display('default', 'Defaults', 'default');
  11. $handler->override_option('relationships', array(
  12.   'parent' => array(
  13.     'label' => 'Parent',
  14.     'required' => 1,
  15.     'id' => 'parent',
  16.     'table' => 'term_hierarchy',
  17.     'field' => 'parent',
  18.     'relationship' => 'none',
  19.   ),
  20. ));
  21. $handler->override_option('fields', array(
  22.   'tid' => array(
  23.     'label' => '',
  24.     'alter' => array(
  25.       'alter_text' => 0,
  26.       'text' => '',
  27.       'make_link' => 0,
  28.       'path' => '',
  29.       'link_class' => '',
  30.       'alt' => '',
  31.       'prefix' => '',
  32.       'suffix' => '',
  33.       'target' => '',
  34.       'help' => '',
  35.       'trim' => 0,
  36.       'max_length' => '',
  37.       'word_boundary' => 1,
  38.       'ellipsis' => 1,
  39.       'html' => 0,
  40.       'strip_tags' => 0,
  41.     ),
  42.     'empty' => '',
  43.     'hide_empty' => 0,
  44.     'empty_zero' => 0,
  45.     'set_precision' => FALSE,
  46.     'precision' => 0,
  47.     'decimal' => '.',
  48.     'separator' => ',',
  49.     'prefix' => '',
  50.     'suffix' => '',
  51.     'exclude' => 1,
  52.     'id' => 'tid',
  53.     'table' => 'term_data',
  54.     'field' => 'tid',
  55.     'override' => array(
  56.       'button' => 'Override',
  57.     ),
  58.     'relationship' => 'none',
  59.   ),
  60.   'name' => array(
  61.     'label' => '',
  62.     'alter' => array(
  63.       'alter_text' => 0,
  64.       'text' => '',
  65.       'make_link' => 1,
  66.       'path' => 'terms/[tid]',
  67.       'link_class' => '',
  68.       'alt' => '',
  69.       'prefix' => '',
  70.       'suffix' => '',
  71.       'target' => '',
  72.       'help' => '',
  73.       'trim' => 0,
  74.       'max_length' => '',
  75.       'word_boundary' => 1,
  76.       'ellipsis' => 1,
  77.       'html' => 0,
  78.       'strip_tags' => 0,
  79.     ),
  80.     'empty' => '',
  81.     'hide_empty' => 0,
  82.     'empty_zero' => 0,
  83.     'link_to_taxonomy' => 0,
  84.     'exclude' => 0,
  85.     'id' => 'name',
  86.     'table' => 'term_data',
  87.     'field' => 'name',
  88.     'relationship' => 'none',
  89.   ),
  90. ));
  91. $handler->override_option('arguments', array(
  92.   'parent' => array(
  93.     'default_action' => 'ignore',
  94.     'style_plugin' => 'default_summary',
  95.     'style_options' => array(),
  96.     'wildcard' => 'all',
  97.     'wildcard_substitution' => 'All',
  98.     'title' => '',
  99.     'breadcrumb' => '',
  100.     'default_argument_type' => 'fixed',
  101.     'default_argument' => '',
  102.     'validate_type' => 'taxonomy_term',
  103.     'validate_fail' => 'not found',
  104.     'break_phrase' => 0,
  105.     'not' => 0,
  106.     'id' => 'parent',
  107.     'table' => 'term_hierarchy',
  108.     'field' => 'parent',
  109.     'validate_user_argument_type' => 'uid',
  110.     'validate_user_roles' => array(
  111.       '2' => 0,
  112.       '3' => 0,
  113.     ),
  114.     'relationship' => 'none',
  115.     'default_options_div_prefix' => '',
  116.     'default_argument_fixed' => '',
  117.     'default_argument_user' => 0,
  118.     'default_argument_php' => '',
  119.     'validate_argument_node_type' => array(
  120.       'page' => 0,
  121.       'story' => 0,
  122.     ),
  123.     'validate_argument_node_access' => 0,
  124.     'validate_argument_nid_type' => 'nid',
  125.     'validate_argument_vocabulary' => array(
  126.       '1' => 1,
  127.     ),
  128.     'validate_argument_type' => 'tid',
  129.     'validate_argument_transform' => 0,
  130.     'validate_user_restrict_roles' => 0,
  131.     'validate_argument_php' => '',
  132.   ),
  133. ));
  134. $handler->override_option('filters', array(
  135.   'vid' => array(
  136.     'operator' => 'in',
  137.     'value' => array(
  138.       '1' => '1',
  139.     ),
  140.     'group' => '0',
  141.     'exposed' => FALSE,
  142.     'expose' => array(
  143.       'operator' => FALSE,
  144.       'label' => '',
  145.     ),
  146.     'id' => 'vid',
  147.     'table' => 'term_data',
  148.     'field' => 'vid',
  149.     'relationship' => 'parent',
  150.   ),
  151. ));
  152. $handler->override_option('access', array(
  153.   'type' => 'none',
  154. ));
  155. $handler->override_option('cache', array(
  156.   'type' => 'none',
  157. ));
  158. $handler->override_option('items_per_page', 0);
  159. $handler->override_option('distinct', 1);
  160. $handler = $view->new_display('page', 'Page', 'page_1');
  161. $handler->override_option('path', 'terms');
  162. $handler->override_option('menu', array(
  163.   'type' => 'none',
  164.   'title' => '',
  165.   'description' => '',
  166.   'weight' => 0,
  167.   'name' => 'navigation',
  168. ));
  169. $handler->override_option('tab_options', array(
  170.   'type' => 'none',
  171.   'title' => '',
  172.   'description' => '',
  173.   'weight' => 0,
  174.   'name' => 'navigation',
  175. ));

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.