Posted By

picxelplay on 05/23/12


Tagged


Versions (?)

D7 Views3 Related Products block export


 / Published in: Other
 

D7 Views3 Related Products block export

  1. $view = new view;
  2. $view->name = 'related_products';
  3. $view->description = '';
  4. $view->tag = 'default';
  5. $view->base_table = 'node';
  6. $view->human_name = 'Related Products';
  7. $view->core = 7;
  8. $view->api_version = '3.0';
  9. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  10.  
  11. /* Display: Master */
  12. $handler = $view->new_display('default', 'Master', 'default');
  13. $handler->display->display_options['title'] = 'Related Products';
  14. $handler->display->display_options['access']['type'] = 'perm';
  15. $handler->display->display_options['cache']['type'] = 'none';
  16. $handler->display->display_options['query']['type'] = 'views_query';
  17. $handler->display->display_options['query']['options']['query_comment'] = FALSE;
  18. $handler->display->display_options['exposed_form']['type'] = 'basic';
  19. $handler->display->display_options['pager']['type'] = 'some';
  20. $handler->display->display_options['pager']['options']['items_per_page'] = '3';
  21. $handler->display->display_options['style_plugin'] = 'default';
  22. $handler->display->display_options['row_plugin'] = 'fields';
  23. /* Relationship: Entity Reference: Referenced Entity */
  24. $handler->display->display_options['relationships']['field_related_target_id']['id'] = 'field_related_target_id';
  25. $handler->display->display_options['relationships']['field_related_target_id']['table'] = 'field_data_field_related';
  26. $handler->display->display_options['relationships']['field_related_target_id']['field'] = 'field_related_target_id';
  27. $handler->display->display_options['relationships']['field_related_target_id']['required'] = 1;
  28. /* Field: Content: Title */
  29. $handler->display->display_options['fields']['title']['id'] = 'title';
  30. $handler->display->display_options['fields']['title']['table'] = 'node';
  31. $handler->display->display_options['fields']['title']['field'] = 'title';
  32. $handler->display->display_options['fields']['title']['relationship'] = 'field_related_target_id';
  33. $handler->display->display_options['fields']['title']['label'] = '';
  34. $handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
  35. $handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
  36. $handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
  37. $handler->display->display_options['fields']['title']['alter']['external'] = 0;
  38. $handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0;
  39. $handler->display->display_options['fields']['title']['alter']['trim_whitespace'] = 0;
  40. $handler->display->display_options['fields']['title']['alter']['nl2br'] = 0;
  41. $handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
  42. $handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
  43. $handler->display->display_options['fields']['title']['alter']['more_link'] = 0;
  44. $handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
  45. $handler->display->display_options['fields']['title']['alter']['trim'] = 0;
  46. $handler->display->display_options['fields']['title']['alter']['html'] = 0;
  47. $handler->display->display_options['fields']['title']['element_label_colon'] = FALSE;
  48. $handler->display->display_options['fields']['title']['element_default_classes'] = 1;
  49. $handler->display->display_options['fields']['title']['hide_empty'] = 0;
  50. $handler->display->display_options['fields']['title']['empty_zero'] = 0;
  51. $handler->display->display_options['fields']['title']['hide_alter_empty'] = 1;
  52. $handler->display->display_options['fields']['title']['link_to_node'] = 1;
  53. /* Contextual filter: Content: Nid */
  54. $handler->display->display_options['arguments']['nid']['id'] = 'nid';
  55. $handler->display->display_options['arguments']['nid']['table'] = 'node';
  56. $handler->display->display_options['arguments']['nid']['field'] = 'nid';
  57. $handler->display->display_options['arguments']['nid']['default_action'] = 'default';
  58. $handler->display->display_options['arguments']['nid']['default_argument_type'] = 'node';
  59. $handler->display->display_options['arguments']['nid']['default_argument_skip_url'] = 0;
  60. $handler->display->display_options['arguments']['nid']['summary']['number_of_records'] = '0';
  61. $handler->display->display_options['arguments']['nid']['summary']['format'] = 'default_summary';
  62. $handler->display->display_options['arguments']['nid']['summary_options']['items_per_page'] = '25';
  63. $handler->display->display_options['arguments']['nid']['break_phrase'] = 0;
  64. $handler->display->display_options['arguments']['nid']['not'] = 0;
  65.  
  66. /* Display: Block */
  67. $handler = $view->new_display('block', 'Block', 'block');

Report this snippet  

You need to login to post a comment.