Posted By

shrop on 05/19/08


Tagged

textmate drupal views cck


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

Leech
panatlantica
basicmagic
aleprieto


Drupal: View for Image Gallery


 / Published in: Other
 

View to use with the docs at http://drupal.org/node/144725 for creating image gallery using cck, views and thickbox.

  1. $view = new stdClass();
  2. $view->name = 'image_gallery';
  3. $view->description = 'Image gallery photos uploaded by users.';
  4. $view->access = array (
  5. );
  6. $view->view_args_php = '';
  7. $view->page = TRUE;
  8. $view->page_title = 'Image Gallery';
  9. $view->page_header = '';
  10. $view->page_header_format = '1';
  11. $view->page_footer = '';
  12. $view->page_footer_format = '1';
  13. $view->page_empty = '';
  14. $view->page_empty_format = '1';
  15. $view->page_type = 'bonus_grid';
  16. $view->url = 'gallery';
  17. $view->use_pager = TRUE;
  18. $view->nodes_per_page = '24';
  19. $view->sort = array (
  20. );
  21. $view->argument = array (
  22. );
  23. $view->field = array (
  24. array (
  25. 'tablename' => 'node',
  26. 'field' => 'title',
  27. 'label' => '',
  28. 'handler' => 'views_handler_field_nodelink',
  29. 'options' => 'link',
  30. ),
  31. array (
  32. 'tablename' => 'node_data_field_image',
  33. 'field' => 'field_image_fid',
  34. 'label' => '',
  35. 'handler' => 'content_views_field_handler_ungroup',
  36. 'options' => 'thickbox][square-thumbnail',
  37. ),
  38. );
  39. $view->filter = array (
  40. array (
  41. 'tablename' => 'node',
  42. 'field' => 'status',
  43. 'operator' => '=',
  44. 'options' => '',
  45. 'value' => '1',
  46. ),
  47. array (
  48. 'tablename' => 'node',
  49. 'field' => 'type',
  50. 'operator' => 'OR',
  51. 'options' => '',
  52. 'value' => array (
  53. 0 => 'gallery_image',
  54. ),
  55. ),
  56. );
  57. $view->exposed_filter = array (
  58. );
  59. $view->requires = array(node, node_data_field_image);
  60. $views[$view->name] = $view;

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Ad3mist on March 31, 2010

thanks you very good topic. regards Sohbet sohbet Alem Sohbet sohbet siteleri Sohbet odaları porno izle liseli sex

You need to login to post a comment.