amonoxia

Exported View for Resource Search

Jun 30th, 2017
67
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $view = new view();
  2. $view->name = 'resources';
  3. $view->description = 'Directory of foster care related resources';
  4. $view->tag = 'default';
  5. $view->base_table = 'node';
  6. $view->human_name = 'Resources';
  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: Page */
  12. $handler = $view->new_display('page', 'Page', 'page');
  13. $handler->display->display_options['defaults']['css_class'] = FALSE;
  14. $handler->display->display_options['display_description'] = 'For search block';
  15. $handler->display->display_options['defaults']['exposed_form'] = FALSE;
  16. $handler->display->display_options['exposed_form']['type'] = 'better_exposed_filters';
  17. $handler->display->display_options['exposed_form']['options']['reset_button'] = TRUE;
  18. $handler->display->display_options['exposed_form']['options']['expose_sort_order'] = FALSE;
  19. $handler->display->display_options['exposed_form']['options']['bef'] = array(
  20. 'general' => array(
  21. 'input_required' => 0,
  22. 'text_input_required' => array(
  23. 'text_input_required' => array(
  24. 'value' => '',
  25. 'format' => 'plain_text',
  26. ),
  27. ),
  28. 'allow_secondary' => 0,
  29. 'secondary_label' => 'Advanced options',
  30. 'secondary_collapse_override' => '0',
  31. ),
  32. 'keys' => array(
  33. 'bef_format' => 'default',
  34. 'more_options' => array(
  35. 'autosubmit' => 1,
  36. 'is_secondary' => 0,
  37. 'any_label' => '',
  38. 'bef_filter_description' => '',
  39. 'tokens' => array(
  40. 'available' => array(
  41. 0 => 'global_types',
  42. ),
  43. ),
  44. 'rewrite' => array(
  45. 'filter_rewrite_values' => '',
  46. ),
  47. ),
  48. ),
  49. 'field_resource_type_tid' => array(
  50. 'bef_format' => 'bef',
  51. 'more_options' => array(
  52. 'bef_select_all_none' => 1,
  53. 'bef_collapsible' => 0,
  54. 'autosubmit' => 0,
  55. 'is_secondary' => 0,
  56. 'any_label' => '',
  57. 'bef_filter_description' => '',
  58. 'tokens' => array(
  59. 'available' => array(
  60. 0 => 'global_types',
  61. 1 => 'vocabulary',
  62. ),
  63. ),
  64. 'rewrite' => array(
  65. 'filter_rewrite_values' => '',
  66. ),
  67. ),
  68. ),
  69. 'field_resource_areas_served_tid' => array(
  70. 'bef_format' => 'default',
  71. 'more_options' => array(
  72. 'bef_select_all_none' => 1,
  73. 'bef_collapsible' => 0,
  74. 'autosubmit' => 1,
  75. 'is_secondary' => 0,
  76. 'any_label' => '',
  77. 'bef_filter_description' => '',
  78. 'tokens' => array(
  79. 'available' => array(
  80. 0 => 'global_types',
  81. 1 => 'vocabulary',
  82. ),
  83. ),
  84. 'rewrite' => array(
  85. 'filter_rewrite_values' => '',
  86. ),
  87. ),
  88. ),
  89. );
  90. $handler->display->display_options['exposed_block'] = TRUE;
  91. $handler->display->display_options['defaults']['footer'] = FALSE;
  92. $handler->display->display_options['defaults']['fields'] = FALSE;
  93. /* Field: Global: Fieldset */
  94. $handler->display->display_options['fields']['fieldset']['id'] = 'fieldset';
  95. $handler->display->display_options['fields']['fieldset']['table'] = 'views';
  96. $handler->display->display_options['fields']['fieldset']['field'] = 'fieldset';
  97. $handler->display->display_options['fields']['fieldset']['label'] = 'resource_fieldset';
  98. $handler->display->display_options['fields']['fieldset']['children'] = array(
  99. 0 => 'field_resource_type',
  100. 1 => 'title',
  101. 2 => 'field_resource_phone',
  102. 3 => 'field_resource_e_mail',
  103. 4 => 'field_resource_website',
  104. 5 => 'body',
  105. 6 => 'nothing_1',
  106. );
  107. $handler->display->display_options['fields']['fieldset']['fieldset']['type'] = 'div';
  108. $handler->display->display_options['fields']['fieldset']['fieldset']['classes'] = 'col-sm-8';
  109. /* Field: Content: Resource Type */
  110. $handler->display->display_options['fields']['field_resource_type']['id'] = 'field_resource_type';
  111. $handler->display->display_options['fields']['field_resource_type']['table'] = 'field_data_field_resource_type';
  112. $handler->display->display_options['fields']['field_resource_type']['field'] = 'field_resource_type';
  113. $handler->display->display_options['fields']['field_resource_type']['label'] = '';
  114. $handler->display->display_options['fields']['field_resource_type']['element_type'] = 'div';
  115. $handler->display->display_options['fields']['field_resource_type']['element_class'] = 'custom-resource-category-tag';
  116. $handler->display->display_options['fields']['field_resource_type']['element_label_colon'] = FALSE;
  117. $handler->display->display_options['fields']['field_resource_type']['element_default_classes'] = FALSE;
  118. $handler->display->display_options['fields']['field_resource_type']['settings'] = array(
  119. 'field_formatter_class' => '',
  120. );
  121. $handler->display->display_options['fields']['field_resource_type']['delta_offset'] = '0';
  122. $handler->display->display_options['fields']['field_resource_type']['field_api_classes'] = TRUE;
  123. /* Field: Content: Title */
  124. $handler->display->display_options['fields']['title']['id'] = 'title';
  125. $handler->display->display_options['fields']['title']['table'] = 'node';
  126. $handler->display->display_options['fields']['title']['field'] = 'title';
  127. $handler->display->display_options['fields']['title']['label'] = '';
  128. $handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
  129. $handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
  130. $handler->display->display_options['fields']['title']['element_type'] = 'h2';
  131. $handler->display->display_options['fields']['title']['element_class'] = 'glazed-util-text-uppercase';
  132. $handler->display->display_options['fields']['title']['element_label_colon'] = FALSE;
  133. /* Field: Content: Phone number */
  134. $handler->display->display_options['fields']['field_resource_phone']['id'] = 'field_resource_phone';
  135. $handler->display->display_options['fields']['field_resource_phone']['table'] = 'field_data_field_resource_phone';
  136. $handler->display->display_options['fields']['field_resource_phone']['field'] = 'field_resource_phone';
  137. $handler->display->display_options['fields']['field_resource_phone']['label'] = '';
  138. $handler->display->display_options['fields']['field_resource_phone']['alter']['path'] = '[field_resource_phone]';
  139. $handler->display->display_options['fields']['field_resource_phone']['element_type'] = 'div';
  140. $handler->display->display_options['fields']['field_resource_phone']['element_class'] = 'custom-directory-contact';
  141. $handler->display->display_options['fields']['field_resource_phone']['element_label_colon'] = FALSE;
  142. $handler->display->display_options['fields']['field_resource_phone']['element_default_classes'] = FALSE;
  143. $handler->display->display_options['fields']['field_resource_phone']['settings'] = array(
  144. 'field_formatter_class' => '',
  145. );
  146. $handler->display->display_options['fields']['field_resource_phone']['field_api_classes'] = TRUE;
  147. /* Field: Content: E-mail */
  148. $handler->display->display_options['fields']['field_resource_e_mail']['id'] = 'field_resource_e_mail';
  149. $handler->display->display_options['fields']['field_resource_e_mail']['table'] = 'field_data_field_resource_e_mail';
  150. $handler->display->display_options['fields']['field_resource_e_mail']['field'] = 'field_resource_e_mail';
  151. $handler->display->display_options['fields']['field_resource_e_mail']['label'] = '';
  152. $handler->display->display_options['fields']['field_resource_e_mail']['alter']['alter_text'] = TRUE;
  153. $handler->display->display_options['fields']['field_resource_e_mail']['alter']['text'] = 'E-mail';
  154. $handler->display->display_options['fields']['field_resource_e_mail']['alter']['make_link'] = TRUE;
  155. $handler->display->display_options['fields']['field_resource_e_mail']['alter']['path'] = 'mailto:[field_resource_e_mail]';
  156. $handler->display->display_options['fields']['field_resource_e_mail']['alter']['external'] = TRUE;
  157. $handler->display->display_options['fields']['field_resource_e_mail']['element_type'] = 'div';
  158. $handler->display->display_options['fields']['field_resource_e_mail']['element_class'] = 'custom-directory-contact';
  159. $handler->display->display_options['fields']['field_resource_e_mail']['element_label_colon'] = FALSE;
  160. $handler->display->display_options['fields']['field_resource_e_mail']['element_default_classes'] = FALSE;
  161. $handler->display->display_options['fields']['field_resource_e_mail']['settings'] = array(
  162. 'field_formatter_class' => '',
  163. );
  164. $handler->display->display_options['fields']['field_resource_e_mail']['field_api_classes'] = TRUE;
  165. /* Field: Content: Website */
  166. $handler->display->display_options['fields']['field_resource_website']['id'] = 'field_resource_website';
  167. $handler->display->display_options['fields']['field_resource_website']['table'] = 'field_data_field_resource_website';
  168. $handler->display->display_options['fields']['field_resource_website']['field'] = 'field_resource_website';
  169. $handler->display->display_options['fields']['field_resource_website']['label'] = '';
  170. $handler->display->display_options['fields']['field_resource_website']['alter']['alter_text'] = TRUE;
  171. $handler->display->display_options['fields']['field_resource_website']['alter']['text'] = 'Website';
  172. $handler->display->display_options['fields']['field_resource_website']['alter']['make_link'] = TRUE;
  173. $handler->display->display_options['fields']['field_resource_website']['alter']['path'] = '[field_resource_website]';
  174. $handler->display->display_options['fields']['field_resource_website']['element_label_colon'] = FALSE;
  175. $handler->display->display_options['fields']['field_resource_website']['element_default_classes'] = FALSE;
  176. $handler->display->display_options['fields']['field_resource_website']['settings'] = array(
  177. 'field_formatter_class' => '',
  178. );
  179. $handler->display->display_options['fields']['field_resource_website']['field_api_classes'] = TRUE;
  180. /* Field: Content: Question */
  181. $handler->display->display_options['fields']['body']['id'] = 'body';
  182. $handler->display->display_options['fields']['body']['table'] = 'field_data_body';
  183. $handler->display->display_options['fields']['body']['field'] = 'body';
  184. $handler->display->display_options['fields']['body']['label'] = '';
  185. $handler->display->display_options['fields']['body']['element_label_colon'] = FALSE;
  186. $handler->display->display_options['fields']['body']['element_default_classes'] = FALSE;
  187. $handler->display->display_options['fields']['body']['type'] = 'text_summary_or_trimmed';
  188. $handler->display->display_options['fields']['body']['settings'] = array(
  189. 'trim_length' => '200',
  190. 'field_formatter_class' => '',
  191. );
  192. $handler->display->display_options['fields']['body']['field_api_classes'] = TRUE;
  193. /* Field: Global: Custom text */
  194. $handler->display->display_options['fields']['nothing_1']['id'] = 'nothing_1';
  195. $handler->display->display_options['fields']['nothing_1']['table'] = 'views';
  196. $handler->display->display_options['fields']['nothing_1']['field'] = 'nothing';
  197. $handler->display->display_options['fields']['nothing_1']['label'] = '';
  198. $handler->display->display_options['fields']['nothing_1']['alter']['text'] = '<hr>';
  199. $handler->display->display_options['fields']['nothing_1']['element_label_colon'] = FALSE;
  200. $handler->display->display_options['defaults']['sorts'] = FALSE;
  201. /* Sort criterion: Content: Sticky */
  202. $handler->display->display_options['sorts']['sticky']['id'] = 'sticky';
  203. $handler->display->display_options['sorts']['sticky']['table'] = 'node';
  204. $handler->display->display_options['sorts']['sticky']['field'] = 'sticky';
  205. $handler->display->display_options['sorts']['sticky']['order'] = 'DESC';
  206. /* Sort criterion: Content: Post date */
  207. $handler->display->display_options['sorts']['created']['id'] = 'created';
  208. $handler->display->display_options['sorts']['created']['table'] = 'node';
  209. $handler->display->display_options['sorts']['created']['field'] = 'created';
  210. $handler->display->display_options['sorts']['created']['order'] = 'DESC';
  211. $handler->display->display_options['defaults']['filter_groups'] = FALSE;
  212. $handler->display->display_options['defaults']['filters'] = FALSE;
  213. /* Filter criterion: Content: Published */
  214. $handler->display->display_options['filters']['status']['id'] = 'status';
  215. $handler->display->display_options['filters']['status']['table'] = 'node';
  216. $handler->display->display_options['filters']['status']['field'] = 'status';
  217. $handler->display->display_options['filters']['status']['value'] = 1;
  218. $handler->display->display_options['filters']['status']['group'] = 1;
  219. $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
  220. /* Filter criterion: Content: Type */
  221. $handler->display->display_options['filters']['type']['id'] = 'type';
  222. $handler->display->display_options['filters']['type']['table'] = 'node';
  223. $handler->display->display_options['filters']['type']['field'] = 'type';
  224. $handler->display->display_options['filters']['type']['value'] = array(
  225. 'resource' => 'resource',
  226. );
  227. $handler->display->display_options['filters']['type']['group'] = 1;
  228. /* Filter criterion: Content: Question (body) */
  229. $handler->display->display_options['filters']['body_value']['id'] = 'body_value';
  230. $handler->display->display_options['filters']['body_value']['table'] = 'field_data_body';
  231. $handler->display->display_options['filters']['body_value']['field'] = 'body_value';
  232. $handler->display->display_options['filters']['body_value']['operator'] = 'contains';
  233. $handler->display->display_options['filters']['body_value']['group'] = 1;
  234. $handler->display->display_options['filters']['body_value']['exposed'] = TRUE;
  235. $handler->display->display_options['filters']['body_value']['expose']['operator_id'] = 'body_value_op';
  236. $handler->display->display_options['filters']['body_value']['expose']['label'] = 'KEYWORD';
  237. $handler->display->display_options['filters']['body_value']['expose']['operator'] = 'body_value_op';
  238. $handler->display->display_options['filters']['body_value']['expose']['identifier'] = 'body_value';
  239. $handler->display->display_options['filters']['body_value']['expose']['remember_roles'] = array(
  240. 2 => '2',
  241. 1 => 0,
  242. 11 => 0,
  243. 10 => 0,
  244. 12 => 0,
  245. 3 => 0,
  246. 4 => 0,
  247. 7 => 0,
  248. 8 => 0,
  249. );
  250. /* Filter criterion: Content: Resource Type (field_resource_type) */
  251. $handler->display->display_options['filters']['field_resource_type_tid']['id'] = 'field_resource_type_tid';
  252. $handler->display->display_options['filters']['field_resource_type_tid']['table'] = 'field_data_field_resource_type';
  253. $handler->display->display_options['filters']['field_resource_type_tid']['field'] = 'field_resource_type_tid';
  254. $handler->display->display_options['filters']['field_resource_type_tid']['group'] = 1;
  255. $handler->display->display_options['filters']['field_resource_type_tid']['exposed'] = TRUE;
  256. $handler->display->display_options['filters']['field_resource_type_tid']['expose']['operator_id'] = 'field_resource_type_tid_op';
  257. $handler->display->display_options['filters']['field_resource_type_tid']['expose']['label'] = 'RESOURCE TYPE';
  258. $handler->display->display_options['filters']['field_resource_type_tid']['expose']['operator'] = 'field_resource_type_tid_op';
  259. $handler->display->display_options['filters']['field_resource_type_tid']['expose']['identifier'] = 'field_resource_type_tid';
  260. $handler->display->display_options['filters']['field_resource_type_tid']['expose']['remember'] = TRUE;
  261. $handler->display->display_options['filters']['field_resource_type_tid']['expose']['multiple'] = TRUE;
  262. $handler->display->display_options['filters']['field_resource_type_tid']['expose']['remember_roles'] = array(
  263. 2 => '2',
  264. 1 => 0,
  265. 11 => 0,
  266. 10 => 0,
  267. 12 => 0,
  268. 3 => 0,
  269. 4 => 0,
  270. 7 => 0,
  271. 8 => 0,
  272. );
  273. $handler->display->display_options['filters']['field_resource_type_tid']['reduce_duplicates'] = TRUE;
  274. $handler->display->display_options['filters']['field_resource_type_tid']['type'] = 'select';
  275. $handler->display->display_options['filters']['field_resource_type_tid']['vocabulary'] = 'resource_type';
  276. /* Filter criterion: Content: Areas served (field_resource_areas_served) */
  277. $handler->display->display_options['filters']['field_resource_areas_served_tid']['id'] = 'field_resource_areas_served_tid';
  278. $handler->display->display_options['filters']['field_resource_areas_served_tid']['table'] = 'field_data_field_resource_areas_served';
  279. $handler->display->display_options['filters']['field_resource_areas_served_tid']['field'] = 'field_resource_areas_served_tid';
  280. $handler->display->display_options['filters']['field_resource_areas_served_tid']['group'] = 1;
  281. $handler->display->display_options['filters']['field_resource_areas_served_tid']['exposed'] = TRUE;
  282. $handler->display->display_options['filters']['field_resource_areas_served_tid']['expose']['operator_id'] = 'field_resource_areas_served_tid_op';
  283. $handler->display->display_options['filters']['field_resource_areas_served_tid']['expose']['label'] = 'STATE';
  284. $handler->display->display_options['filters']['field_resource_areas_served_tid']['expose']['operator'] = 'field_resource_areas_served_tid_op';
  285. $handler->display->display_options['filters']['field_resource_areas_served_tid']['expose']['identifier'] = 'field_resource_areas_served_tid';
  286. $handler->display->display_options['filters']['field_resource_areas_served_tid']['expose']['remember'] = TRUE;
  287. $handler->display->display_options['filters']['field_resource_areas_served_tid']['expose']['remember_roles'] = array(
  288. 2 => '2',
  289. 1 => 0,
  290. 11 => 0,
  291. 10 => 0,
  292. 12 => 0,
  293. 3 => 0,
  294. 4 => 0,
  295. 7 => 0,
  296. 8 => 0,
  297. );
  298. $handler->display->display_options['filters']['field_resource_areas_served_tid']['reduce_duplicates'] = TRUE;
  299. $handler->display->display_options['filters']['field_resource_areas_served_tid']['type'] = 'select';
  300. $handler->display->display_options['filters']['field_resource_areas_served_tid']['vocabulary'] = 'resource_areas_served';
  301. $handler->display->display_options['path'] = 'resources';
  302.  
  303. <br>'),
  304. );
RAW Paste Data