Guest User

Untitled

a guest
Jul 22nd, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.40 KB | None | 0 0
  1. $view = new view;
  2. $view->name = 'Mobile_faq_page';
  3. $view->description = 'Mobile FAQ view each section';
  4. $view->tag = '';
  5. $view->view_php = '';
  6. $view->base_table = 'node';
  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('fields', array(
  12. 'field_question_value' => array(
  13. 'label' => '',
  14. 'alter' => array(
  15. 'alter_text' => 0,
  16. 'text' => '',
  17. 'make_link' => 0,
  18. 'path' => '',
  19. 'link_class' => '',
  20. 'alt' => '',
  21. 'prefix' => '',
  22. 'suffix' => '',
  23. 'target' => '',
  24. 'help' => '',
  25. 'trim' => 0,
  26. 'max_length' => '',
  27. 'word_boundary' => 1,
  28. 'ellipsis' => 1,
  29. 'html' => 0,
  30. 'strip_tags' => 0,
  31. ),
  32. 'empty' => '',
  33. 'hide_empty' => 0,
  34. 'empty_zero' => 0,
  35. 'link_to_node' => 0,
  36. 'label_type' => 'none',
  37. 'format' => 'default',
  38. 'multiple' => array(
  39. 'group' => TRUE,
  40. 'multiple_number' => '',
  41. 'multiple_from' => '',
  42. 'multiple_reversed' => FALSE,
  43. ),
  44. 'exclude' => 1,
  45. 'id' => 'field_question_value',
  46. 'table' => 'node_data_field_question',
  47. 'field' => 'field_question_value',
  48. 'relationship' => 'none',
  49. 'override' => array(
  50. 'button' => 'Override',
  51. ),
  52. ),
  53. 'body' => array(
  54. 'label' => '',
  55. 'alter' => array(
  56. 'alter_text' => 0,
  57. 'text' => '',
  58. 'make_link' => 0,
  59. 'path' => '',
  60. 'link_class' => '',
  61. 'alt' => '',
  62. 'prefix' => '',
  63. 'suffix' => '',
  64. 'target' => '',
  65. 'help' => '',
  66. 'trim' => 0,
  67. 'max_length' => '',
  68. 'word_boundary' => 1,
  69. 'ellipsis' => 1,
  70. 'html' => 0,
  71. 'strip_tags' => 0,
  72. ),
  73. 'empty' => '',
  74. 'hide_empty' => 0,
  75. 'empty_zero' => 0,
  76. 'exclude' => 1,
  77. 'id' => 'body',
  78. 'table' => 'node_revisions',
  79. 'field' => 'body',
  80. 'override' => array(
  81. 'button' => 'Override',
  82. ),
  83. 'relationship' => 'none',
  84. ),
  85. 'phpcode' => array(
  86. 'label' => '',
  87. 'alter' => array(
  88. 'alter_text' => 0,
  89. 'text' => '',
  90. 'make_link' => 0,
  91. 'path' => '',
  92. 'link_class' => '',
  93. 'alt' => '',
  94. 'prefix' => '',
  95. 'suffix' => '',
  96. 'target' => '',
  97. 'help' => '',
  98. 'trim' => 0,
  99. 'max_length' => '',
  100. 'word_boundary' => 1,
  101. 'ellipsis' => 1,
  102. 'html' => 0,
  103. 'strip_tags' => 0,
  104. ),
  105. 'empty' => '',
  106. 'hide_empty' => 0,
  107. 'empty_zero' => 0,
  108. 'value' => '<?php $node = node_load($data->nid);
  109. if ($_GET[\'print\'] == TRUE):
  110. // Create one for print friendly. (Note: legend tag occured word wrap issue.)
  111. ?>
  112. <div class="section">
  113. <h2><?php echo $node->title; ?></h2>
  114. <p><?php echo $node->body; ?></p>
  115. </div>
  116. <?php
  117. else:
  118. ?>
  119. <fieldset class="collapsible collapsed">
  120. <legend> <?php echo $node->title; ?> </legend>
  121. <div> <?php echo $node->body; ?></div>
  122. </fieldset>
  123. <?
  124. endif;',
  125. 'exclude' => 0,
  126. 'id' => 'phpcode',
  127. 'table' => 'customfield',
  128. 'field' => 'phpcode',
  129. 'override' => array(
  130. 'button' => 'Override',
  131. ),
  132. 'relationship' => 'none',
  133. ),
  134. 'edit_node' => array(
  135. 'label' => '',
  136. 'alter' => array(
  137. 'alter_text' => 0,
  138. 'text' => '',
  139. 'make_link' => 0,
  140. 'path' => '',
  141. 'link_class' => '',
  142. 'alt' => '',
  143. 'prefix' => '',
  144. 'suffix' => '',
  145. 'target' => '',
  146. 'help' => '',
  147. 'trim' => 0,
  148. 'max_length' => '',
  149. 'word_boundary' => 1,
  150. 'ellipsis' => 1,
  151. 'html' => 0,
  152. 'strip_tags' => 0,
  153. ),
  154. 'empty' => '',
  155. 'hide_empty' => 0,
  156. 'empty_zero' => 0,
  157. 'text' => 'Edit this faq',
  158. 'exclude' => 0,
  159. 'id' => 'edit_node',
  160. 'table' => 'node',
  161. 'field' => 'edit_node',
  162. 'override' => array(
  163. 'button' => 'Override',
  164. ),
  165. 'relationship' => 'none',
  166. ),
  167. ));
  168. $handler->override_option('arguments', array(
  169. 'nid' => array(
  170. 'default_action' => 'ignore',
  171. 'style_plugin' => 'default_summary',
  172. 'style_options' => array(),
  173. 'wildcard' => 'all',
  174. 'wildcard_substitution' => 'All',
  175. 'title' => '',
  176. 'breadcrumb' => '',
  177. 'default_argument_type' => 'fixed',
  178. 'default_argument' => '',
  179. 'validate_type' => 'none',
  180. 'validate_fail' => 'not found',
  181. 'break_phrase' => 0,
  182. 'not' => 0,
  183. 'id' => 'nid',
  184. 'table' => 'node',
  185. 'field' => 'nid',
  186. 'validate_user_argument_type' => 'uid',
  187. 'validate_user_roles' => array(
  188. '2' => 0,
  189. '3' => 0,
  190. ),
  191. 'relationship' => 'none',
  192. 'default_options_div_prefix' => '',
  193. 'default_argument_fixed' => '',
  194. 'default_argument_user' => 0,
  195. 'default_argument_php' => '',
  196. 'validate_argument_node_type' => array(
  197. 'article' => 0,
  198. 'current_situation' => 0,
  199. 'faq' => 0,
  200. 'investment' => 0,
  201. 'overview' => 0,
  202. 'page' => 0,
  203. 'related_links' => 0,
  204. 'section_quote' => 0,
  205. 'slide_culturesociety' => 0,
  206. 'slide_economy' => 0,
  207. 'slide_global_citizen' => 0,
  208. 'slide_monarchy' => 0,
  209. 'slide_politics' => 0,
  210. 'story' => 0,
  211. 'video' => 0,
  212. ),
  213. 'validate_argument_node_access' => 0,
  214. 'validate_argument_nid_type' => 'nid',
  215. 'validate_argument_vocabulary' => array(
  216. '4' => 0,
  217. '1' => 0,
  218. '5' => 0,
  219. ),
  220. 'validate_argument_type' => 'tid',
  221. 'validate_argument_transform' => 0,
  222. 'validate_user_restrict_roles' => 0,
  223. 'validate_argument_php' => '',
  224. 'override' => array(
  225. 'button' => 'Override',
  226. ),
  227. ),
  228. ));
  229. $handler->override_option('access', array(
  230. 'type' => 'none',
  231. ));
  232. $handler->override_option('cache', array(
  233. 'type' => 'none',
  234. ));
  235. $handler->override_option('title', 'FAQ');
  236. $handler->override_option('css_class', 'faq-page-section');
  237. $handler->override_option('header', 'xxxc');
  238. $handler->override_option('header_format', '2');
  239. $handler->override_option('header_empty', 1);
  240. $handler->override_option('footer', '<div class="box">
  241. <div class="box-inner">
  242. <div class="box-content">
  243. <span class="print_html"><?php print l("Print this page", \'print/\' . $_GET[\'q\'], array(\'attributes\' => array(\'rel\' => \'nofollow\', \'onclick\' => \'window.open(this.href); return false\', \'class\' => \'print-page\', \'title\' => \'Display a printer-friendly version of this page.\'))); ?></span>
  244. </div>
  245. </div>
  246. </div>');
  247. $handler->override_option('footer_format', '3');
  248. $handler->override_option('footer_empty', 0);
  249. $handler->override_option('items_per_page', 0);
  250. $handler->override_option('style_plugin', 'list');
  251. $handler->override_option('style_options', array(
  252. 'grouping' => '',
  253. 'type' => 'ol',
  254. ));
  255. $handler = $view->new_display('page', 'Mobile_FAQ-Page', 'page_1');
  256. $handler->override_option('filters', array(
  257. 'type' => array(
  258. 'operator' => 'in',
  259. 'value' => array(
  260. 'faq' => 'faq',
  261. ),
  262. 'group' => '0',
  263. 'exposed' => FALSE,
  264. 'expose' => array(
  265. 'operator' => FALSE,
  266. 'label' => '',
  267. ),
  268. 'id' => 'type',
  269. 'table' => 'node',
  270. 'field' => 'type',
  271. 'override' => array(
  272. 'button' => 'Override',
  273. ),
  274. 'relationship' => 'none',
  275. ),
  276. 'status_extra' => array(
  277. 'operator' => '=',
  278. 'value' => '',
  279. 'group' => '0',
  280. 'exposed' => FALSE,
  281. 'expose' => array(
  282. 'operator' => FALSE,
  283. 'label' => '',
  284. ),
  285. 'id' => 'status_extra',
  286. 'table' => 'node',
  287. 'field' => 'status_extra',
  288. 'override' => array(
  289. 'button' => 'Override',
  290. ),
  291. 'relationship' => 'none',
  292. ),
  293. ));
  294. $handler->override_option('css_class', 'faq-page-all faq-page-section');
  295. $handler->override_option('path', 'faq');
  296. $handler->override_option('menu', array(
  297. 'type' => 'none',
  298. 'title' => '',
  299. 'description' => '',
  300. 'weight' => 0,
  301. 'name' => 'navigation',
  302. ));
  303. $handler->override_option('tab_options', array(
  304. 'type' => 'none',
  305. 'title' => '',
  306. 'description' => '',
  307. 'weight' => 0,
  308. 'name' => 'navigation',
  309. ));
  310. $handler = $view->new_display('page', 'Mobile_FAQ-monarchy-Page', 'page_2');
  311. $handler->override_option('fields', array(
  312. 'field_question_value' => array(
  313. 'label' => '',
  314. 'alter' => array(
  315. 'alter_text' => 0,
  316. 'text' => '',
  317. 'make_link' => 0,
  318. 'path' => '',
  319. 'link_class' => '',
  320. 'alt' => '',
  321. 'prefix' => '',
  322. 'suffix' => '',
  323. 'target' => '',
  324. 'help' => '',
  325. 'trim' => 0,
  326. 'max_length' => '',
  327. 'word_boundary' => 1,
  328. 'ellipsis' => 1,
  329. 'html' => 0,
  330. 'strip_tags' => 0,
  331. ),
  332. 'empty' => '',
  333. 'hide_empty' => 0,
  334. 'empty_zero' => 0,
  335. 'link_to_node' => 0,
  336. 'label_type' => 'none',
  337. 'format' => 'default',
  338. 'multiple' => array(
  339. 'group' => TRUE,
  340. 'multiple_number' => '',
  341. 'multiple_from' => '',
  342. 'multiple_reversed' => FALSE,
  343. ),
  344. 'exclude' => 1,
  345. 'id' => 'field_question_value',
  346. 'table' => 'node_data_field_question',
  347. 'field' => 'field_question_value',
  348. 'relationship' => 'none',
  349. 'override' => array(
  350. 'button' => 'Use default',
  351. ),
  352. ),
  353. 'body' => array(
  354. 'label' => '',
  355. 'alter' => array(
  356. 'alter_text' => 0,
  357. 'text' => '',
  358. 'make_link' => 0,
  359. 'path' => '',
  360. 'link_class' => '',
  361. 'alt' => '',
  362. 'prefix' => '',
  363. 'suffix' => '',
  364. 'target' => '',
  365. 'help' => '',
  366. 'trim' => 0,
  367. 'max_length' => '',
  368. 'word_boundary' => 1,
  369. 'ellipsis' => 1,
  370. 'html' => 0,
  371. 'strip_tags' => 0,
  372. ),
  373. 'empty' => '',
  374. 'hide_empty' => 0,
  375. 'empty_zero' => 0,
  376. 'exclude' => 0,
  377. 'id' => 'body',
  378. 'table' => 'node_revisions',
  379. 'field' => 'body',
  380. 'override' => array(
  381. 'button' => 'Use default',
  382. ),
  383. 'relationship' => 'none',
  384. ),
  385. 'phpcode' => array(
  386. 'label' => '',
  387. 'alter' => array(
  388. 'alter_text' => 0,
  389. 'text' => 'xx<fieldset class="collapsible collapsed">
  390. <legend>[field_question_value]</legend>
  391. <div>[body]</div>
  392. </fieldset>
  393. yy
  394. <h1>[field_question_value]</h1>',
  395. 'make_link' => 0,
  396. 'path' => '',
  397. 'link_class' => '',
  398. 'alt' => '',
  399. 'prefix' => '',
  400. 'suffix' => '',
  401. 'target' => '',
  402. 'help' => '',
  403. 'trim' => 0,
  404. 'max_length' => '',
  405. 'word_boundary' => 1,
  406. 'ellipsis' => 1,
  407. 'html' => 0,
  408. 'strip_tags' => 0,
  409. ),
  410. 'empty' => '',
  411. 'hide_empty' => 0,
  412. 'empty_zero' => 0,
  413. 'value' => '<?php $node = node_load($data->nid);
  414. if ($_GET[\'print\'] == TRUE):
  415. // Create one for print friendly. (Note: legend tag occured word wrap issue.)
  416. ?>
  417. <div class="section">
  418. <h2><?php echo $node->title; ?></h2>
  419. <p><?php echo $node->body; ?></p>
  420. </div>
  421. <?php
  422. else:
  423. ?>
  424. <fieldset class="collapsible collapsed">
  425. <legend> <?php echo $node->title; ?> </legend>
  426. <div> <?php echo $node->body; ?></div>
  427. </fieldset>
  428. <?
  429. endif;',
  430. 'exclude' => 1,
  431. 'id' => 'phpcode',
  432. 'table' => 'customfield',
  433. 'field' => 'phpcode',
  434. 'override' => array(
  435. 'button' => 'Use default',
  436. ),
  437. 'relationship' => 'none',
  438. ),
  439. 'edit_node' => array(
  440. 'label' => '',
  441. 'alter' => array(
  442. 'alter_text' => 0,
  443. 'text' => '',
  444. 'make_link' => 0,
  445. 'path' => '',
  446. 'link_class' => '',
  447. 'alt' => '',
  448. 'prefix' => '',
  449. 'suffix' => '',
  450. 'target' => '',
  451. 'help' => '',
  452. 'trim' => 0,
  453. 'max_length' => '',
  454. 'word_boundary' => 1,
  455. 'ellipsis' => 1,
  456. 'html' => 0,
  457. 'strip_tags' => 0,
  458. ),
  459. 'empty' => '',
  460. 'hide_empty' => 0,
  461. 'empty_zero' => 0,
  462. 'text' => 'Edit this faq',
  463. 'exclude' => 0,
  464. 'id' => 'edit_node',
  465. 'table' => 'node',
  466. 'field' => 'edit_node',
  467. 'override' => array(
  468. 'button' => 'Override',
  469. ),
  470. 'relationship' => 'none',
  471. ),
  472. ));
  473. $handler->override_option('path', 'm/monarchy/faq/%');
  474. $handler->override_option('menu', array(
  475. 'type' => 'normal',
  476. 'title' => 'FAQ',
  477. 'description' => '',
  478. 'weight' => '0',
  479. 'name' => 'primary-links',
  480. ));
  481. $handler->override_option('tab_options', array(
  482. 'type' => 'none',
  483. 'title' => '',
  484. 'description' => '',
  485. 'weight' => 0,
  486. 'name' => 'navigation',
  487. ));
  488. $handler = $view->new_display('page', 'FAQ-politics-Page', 'page_3');
  489. $handler->override_option('filters', array(
  490. 'type' => array(
  491. 'operator' => 'in',
  492. 'value' => array(
  493. 'faq' => 'faq',
  494. ),
  495. 'group' => '0',
  496. 'exposed' => FALSE,
  497. 'expose' => array(
  498. 'operator' => FALSE,
  499. 'label' => '',
  500. ),
  501. 'id' => 'type',
  502. 'table' => 'node',
  503. 'field' => 'type',
  504. 'override' => array(
  505. 'button' => 'Override',
  506. ),
  507. 'relationship' => 'none',
  508. ),
  509. 'status_extra' => array(
  510. 'operator' => '=',
  511. 'value' => '',
  512. 'group' => '0',
  513. 'exposed' => FALSE,
  514. 'expose' => array(
  515. 'operator' => FALSE,
  516. 'label' => '',
  517. ),
  518. 'id' => 'status_extra',
  519. 'table' => 'node',
  520. 'field' => 'status_extra',
  521. 'override' => array(
  522. 'button' => 'Override',
  523. ),
  524. 'relationship' => 'none',
  525. ),
  526. 'tid' => array(
  527. 'operator' => 'or',
  528. 'value' => array(
  529. '2' => '2',
  530. ),
  531. 'group' => '0',
  532. 'exposed' => FALSE,
  533. 'expose' => array(
  534. 'operator' => FALSE,
  535. 'label' => '',
  536. ),
  537. 'type' => 'select',
  538. 'limit' => TRUE,
  539. 'vid' => '1',
  540. 'id' => 'tid',
  541. 'table' => 'term_node',
  542. 'field' => 'tid',
  543. 'hierarchy' => 0,
  544. 'override' => array(
  545. 'button' => 'Use default',
  546. ),
  547. 'relationship' => 'none',
  548. 'reduce_duplicates' => 0,
  549. ),
  550. ));
  551. $handler->override_option('path', 'politics/faq/%');
  552. $handler->override_option('menu', array(
  553. 'type' => 'normal',
  554. 'title' => 'FAQ',
  555. 'description' => '',
  556. 'weight' => '0',
  557. 'name' => 'primary-links',
  558. ));
  559. $handler->override_option('tab_options', array(
  560. 'type' => 'none',
  561. 'title' => '',
  562. 'description' => '',
  563. 'weight' => 0,
  564. 'name' => 'navigation',
  565. ));
  566. $handler = $view->new_display('page', 'FAQ-economy-Page', 'page_4');
  567. $handler->override_option('filters', array(
  568. 'type' => array(
  569. 'operator' => 'in',
  570. 'value' => array(
  571. 'faq' => 'faq',
  572. ),
  573. 'group' => '0',
  574. 'exposed' => FALSE,
  575. 'expose' => array(
  576. 'operator' => FALSE,
  577. 'label' => '',
  578. ),
  579. 'id' => 'type',
  580. 'table' => 'node',
  581. 'field' => 'type',
  582. 'override' => array(
  583. 'button' => 'Override',
  584. ),
  585. 'relationship' => 'none',
  586. ),
  587. 'status_extra' => array(
  588. 'operator' => '=',
  589. 'value' => '',
  590. 'group' => '0',
  591. 'exposed' => FALSE,
  592. 'expose' => array(
  593. 'operator' => FALSE,
  594. 'label' => '',
  595. ),
  596. 'id' => 'status_extra',
  597. 'table' => 'node',
  598. 'field' => 'status_extra',
  599. 'override' => array(
  600. 'button' => 'Override',
  601. ),
  602. 'relationship' => 'none',
  603. ),
  604. 'tid' => array(
  605. 'operator' => 'or',
  606. 'value' => array(
  607. '3' => '3',
  608. ),
  609. 'group' => '0',
  610. 'exposed' => FALSE,
  611. 'expose' => array(
  612. 'operator' => FALSE,
  613. 'label' => '',
  614. ),
  615. 'type' => 'select',
  616. 'limit' => TRUE,
  617. 'vid' => '1',
  618. 'id' => 'tid',
  619. 'table' => 'term_node',
  620. 'field' => 'tid',
  621. 'hierarchy' => 0,
  622. 'override' => array(
  623. 'button' => 'Use default',
  624. ),
  625. 'relationship' => 'none',
  626. 'reduce_duplicates' => 0,
  627. ),
  628. ));
  629. $handler->override_option('path', 'economy/faq/%');
  630. $handler->override_option('menu', array(
  631. 'type' => 'normal',
  632. 'title' => 'FAQ',
  633. 'description' => '',
  634. 'weight' => '0',
  635. 'name' => 'primary-links',
  636. ));
  637. $handler->override_option('tab_options', array(
  638. 'type' => 'none',
  639. 'title' => '',
  640. 'description' => '',
  641. 'weight' => 0,
  642. 'name' => 'navigation',
  643. ));
  644. $handler = $view->new_display('page', 'FAQ-culture_society-Page', 'page_5');
  645. $handler->override_option('filters', array(
  646. 'type' => array(
  647. 'operator' => 'in',
  648. 'value' => array(
  649. 'faq' => 'faq',
  650. ),
  651. 'group' => '0',
  652. 'exposed' => FALSE,
  653. 'expose' => array(
  654. 'operator' => FALSE,
  655. 'label' => '',
  656. ),
  657. 'id' => 'type',
  658. 'table' => 'node',
  659. 'field' => 'type',
  660. 'override' => array(
  661. 'button' => 'Override',
  662. ),
  663. 'relationship' => 'none',
  664. ),
  665. 'status_extra' => array(
  666. 'operator' => '=',
  667. 'value' => '',
  668. 'group' => '0',
  669. 'exposed' => FALSE,
  670. 'expose' => array(
  671. 'operator' => FALSE,
  672. 'label' => '',
  673. ),
  674. 'id' => 'status_extra',
  675. 'table' => 'node',
  676. 'field' => 'status_extra',
  677. 'override' => array(
  678. 'button' => 'Override',
  679. ),
  680. 'relationship' => 'none',
  681. ),
  682. 'tid' => array(
  683. 'operator' => 'or',
  684. 'value' => array(
  685. '4' => '4',
  686. ),
  687. 'group' => '0',
  688. 'exposed' => FALSE,
  689. 'expose' => array(
  690. 'operator' => FALSE,
  691. 'label' => '',
  692. ),
  693. 'type' => 'select',
  694. 'limit' => TRUE,
  695. 'vid' => '1',
  696. 'id' => 'tid',
  697. 'table' => 'term_node',
  698. 'field' => 'tid',
  699. 'hierarchy' => 0,
  700. 'override' => array(
  701. 'button' => 'Use default',
  702. ),
  703. 'relationship' => 'none',
  704. 'reduce_duplicates' => 0,
  705. ),
  706. ));
  707. $handler->override_option('path', 'culture-and-society/faq/%');
  708. $handler->override_option('menu', array(
  709. 'type' => 'normal',
  710. 'title' => 'FAQ',
  711. 'description' => '',
  712. 'weight' => '0',
  713. 'name' => 'primary-links',
  714. ));
  715. $handler->override_option('tab_options', array(
  716. 'type' => 'none',
  717. 'title' => '',
  718. 'description' => '',
  719. 'weight' => 0,
  720. 'name' => 'navigation',
  721. ));
  722. $handler = $view->new_display('page', 'FAQ-global_citizen-Page', 'page_6');
  723. $handler->override_option('path', 'global-citizen/faq/%');
  724. $handler->override_option('menu', array(
  725. 'type' => 'normal',
  726. 'title' => 'FAQ',
  727. 'description' => '',
  728. 'weight' => '0',
  729. 'name' => 'primary-links',
  730. ));
  731. $handler->override_option('tab_options', array(
  732. 'type' => 'none',
  733. 'title' => '',
  734. 'description' => '',
  735. 'weight' => 0,
  736. 'name' => 'navigation',
  737. ));
Add Comment
Please, Sign In to add comment