Last updated June 11, 2012. Created by thaddeusmt on January 15, 2010.
Edited by R.J. Steinert. Log in to edit this page.

To create a View via code with Views 2 in Drupal 6:

  1. Create the view using the View UI like you normally would
  2. Export it to get the code
  3. Replace the first line ($view = new view;) with this: $view = views_new_view();
  4. Then display it, execute it, embed it, or whatever you want (i.e. $view->execute_display('default', array())

Here is an example using a simple View that displays the Title field of all Published nodes:

<?php
//create a new view
$view = views_new_view();
//define the view (this code was generated by the Export)
$view->name = 'test_date_view';
$view->description = '';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
 
'title' => array(
   
'label' => 'Title',
   
'alter' => array(
     
'alter_text' => 0,
     
'text' => '',
     
'make_link' => 0,
     
'path' => '',
     
'alt' => '',
     
'prefix' => '',
     
'suffix' => '',
     
'help' => '',
     
'trim' => 0,
     
'max_length' => '',
     
'word_boundary' => 1,
     
'ellipsis' => 1,
     
'html' => 0,
    ),
   
'link_to_node' => 1,
   
'exclude' => 0,
   
'id' => 'title',
   
'table' => 'node',
   
'field' => 'title',
   
'relationship' => 'none',
  )
));
$handler->override_option('filters', array(
 
'status' => array(
   
'operator' => '=',
   
'value' => '1',
   
'group' => '0',
   
'exposed' => FALSE,
   
'expose' => array(
     
'operator' => FALSE,
     
'label' => '',
    ),
   
'id' => 'status',
   
'table' => 'node',
   
'field' => 'status',
   
'relationship' => 'none',
  )
));
$handler->override_option('access', array(
 
'type' => 'none',
));
$handler->override_option('cache', array(
 
'type' => 'none',
));
$handler->override_option('row_options', array(
 
'inline' => array(),
 
'separator' => '',
));
// now output the view (or whatever you want to do with it)
print $view->execute_display('default', array());
?>

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

It should also be noted, that if you want to save the view to the database, it's as simple as this:

$view->save();

Now I can make custom, complicated views and use these as the filter for a node reference field.
Cheers!

Is there any simple syntax available like following we can pas the arguments and got the result as we want. In this example no field selection option. In your example it is possible. I use if condition before the field display, if it allowed display other wise skipped. If you know the easy way like following then please share

<?php
$view
= 'viewName';
$arg#1 = 'value';
$arg#2 = 'value';
$arg =array($arg#1, $arg#2);
$view = views_get_view($view);
print
$view->preview('default', $arg);
?>

Step 1

Change

$view->disabled = FALSE;
to
$view->disabled = TRUE;

Step 2

Change

// now output the view (or whatever you want to do with it)
print $view->execute_display('default', array());
to
// now output the view (or whatever you want to do with it)
$views[$view->name] = $view;
return $views;

Step 3

Put the code in your own module in a file named with mymodule.views_default.inc. Place this file in the includes directory. This directory you are defined in mymodule.module with

/**
* Implementation of hook_views_api().
*/
function mymodule_views_api() {
  return array(
    'api' => 2.0,
    'path' => drupal_get_path('module', 'mymodule') .'/includes'
  );
}

Step 4

Empty the cache to see the default view in the list of deactivated views (admin/build/views).

This is excellent.

Below is a slight variation that allows for a different file for each different view, which I find easier to manage and do version control with. @quiptime's example has you putting all your views in one text file.

Critical reminder: From the exported view you replace $view = new view; with $view = views_new_view();

In this version, each file uses the machine name of the view with ".inc" added on. You put each view file in: mymodule/includes

This sample is designed for Drupal 6 Views 2.

Follow @quiptime's step 2 but do not include return $views;. That won't be in each view inc file but rather in the mymodule.module.

Here are the entire contents of the mymodule.module file.

<?php
function mymodule_views_api() {
  return array(
'api' => 2.0);
}
/**
* Implementation of hook_views_default_views().
*/
 
function mymodule_views_default_views() {
   
$path = './' . drupal_get_path('module', 'mymodule') . '/includes/*.inc';
   
$views = array();
    foreach (
glob($path) as $views_filename) {
      require_once(
$views_filename);
    }
    return
$views;
  }
?>

For Drupal 7, it's almost the same, but some small differences. See the excellent explanation and code sample in The Definitive Guide to Drupal 7: http://books.google.com/books?id=8I7IT0COId0C&pg=PA85

Thanks for this code, it gave me an php error though. The code below works for me.
Guus van de Wal

<?php
//create a new view
//create a new view
$view = views_new_view();
//define the view (this code was generated by the Export)
$view->name = 'test_date_view';
$view->description = '';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
 
'title' => array(
   
'label' => 'Title',
   
'alter' => array(
     
'alter_text' => 0,
     
'text' => '',
     
'make_link' => 0,
     
'path' => '',
     
'alt' => '',
     
'prefix' => '',
     
'suffix' => '',
     
'help' => '',
     
'trim' => 0,
     
'max_length' => '',
     
'word_boundary' => 1,
     
'ellipsis' => 1,
     
'html' => 0,
    ),
   
'link_to_node' => 1,
   
'exclude' => 0,
   
'id' => 'title',
   
'table' => 'node',
   
'field' => 'title',
   
'relationship' => 'none',
  )));
$handler->override_option('filters', array(
 
'status' => array(
   
'operator' => '=',
   
'value' => '1',
   
'group' => '0',
   
'exposed' => FALSE,
   
'expose' => array(
     
'operator' => FALSE,
     
'label' => '',
    ),
   
'id' => 'status',
   
'table' => 'node',
   
'field' => 'status',
   
'relationship' => 'none',
  )));
$handler->override_option('access', array(
 
'type' => 'none',
));
$handler->override_option('cache', array(
 
'type' => 'none',
));
$handler->override_option('row_options', array(
 
'inline' => array(),
 
'separator' => '',
));
// now output the view (or whatever you want to do with it)
print $view->execute_display('default', array());
?>

[something went wrong here]

Hi,

Thanks for your post. Your information helped me to reduce my number of blocks by a factor 10.

However, when i am trying to execute the below view code using the phpfilter in a textarea,
the values returned are totally wrong, even though the view does display correct results in the View displays screen. Any ideas?

I 'm using D7.

$view = views_new_view();
$view->name = 'Prj_don_donors';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Donateurs_Donaties_Projecten1';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Donaties';
$handler->display->display_options['link_display'] = 'custom_url';
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['exposed_form']['options']['reset_button_label'] = 'Opnieuw instellen';
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['style_plugin'] = 'list';
$handler->display->display_options['style_options']['grouping'] = 'field_donations_donor';
$handler->display->display_options['style_options']['group_rendered'] = 1;
$handler->display->display_options['row_plugin'] = 'fields';
/* Relationship: Inhoud: Donation (field_contributions_donations) - reverse */
$handler->display->display_options['relationships']['reverse_field_contributions_donations_node']['id'] = 'reverse_field_contributions_donations_node';
$handler->display->display_options['relationships']['reverse_field_contributions_donations_node']['table'] = 'node';
$handler->display->display_options['relationships']['reverse_field_contributions_donations_node']['field'] = 'reverse_field_contributions_donations_node';
$handler->display->display_options['relationships']['reverse_field_contributions_donations_node']['required'] = 0;
/* Veld: Inhoud: Titel */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['exclude'] = TRUE;
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['external'] = 0;
$handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['title']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['element_label_colon'] = 1;
$handler->display->display_options['fields']['title']['element_default_classes'] = 1;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Veld: Inhoud: MoneyAmount(Net) */
$handler->display->display_options['fields']['field_donations_money_amount_net']['id'] = 'field_donations_money_amount_net';
$handler->display->display_options['fields']['field_donations_money_amount_net']['table'] = 'field_data_field_donations_money_amount_net';
$handler->display->display_options['fields']['field_donations_money_amount_net']['field'] = 'field_donations_money_amount_net';
$handler->display->display_options['fields']['field_donations_money_amount_net']['label'] = 'Donations MoneyAmount(Net)';
$handler->display->display_options['fields']['field_donations_money_amount_net']['exclude'] = TRUE;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_donations_money_amount_net']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_donations_money_amount_net']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['field_donations_money_amount_net']['field_api_classes'] = 0;
/* Veld: Inhoud: Donor (Name) */
$handler->display->display_options['fields']['field_donations_donor']['id'] = 'field_donations_donor';
$handler->display->display_options['fields']['field_donations_donor']['table'] = 'field_data_field_donations_donor';
$handler->display->display_options['fields']['field_donations_donor']['field'] = 'field_donations_donor';
$handler->display->display_options['fields']['field_donations_donor']['label'] = '';
$handler->display->display_options['fields']['field_donations_donor']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_donations_donor']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_donations_donor']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_donations_donor']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_donations_donor']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['field_donations_donor']['type'] = 'node_reference_plain';
$handler->display->display_options['fields']['field_donations_donor']['field_api_classes'] = 0;
/* Veld: Inhoud: Donation */
$handler->display->display_options['fields']['field_contributions_donations']['id'] = 'field_contributions_donations';
$handler->display->display_options['fields']['field_contributions_donations']['table'] = 'field_data_field_contributions_donations';
$handler->display->display_options['fields']['field_contributions_donations']['field'] = 'field_contributions_donations';
$handler->display->display_options['fields']['field_contributions_donations']['relationship'] = 'reverse_field_contributions_donations_node';
$handler->display->display_options['fields']['field_contributions_donations']['label'] = 'Gesplitste donation';
$handler->display->display_options['fields']['field_contributions_donations']['exclude'] = TRUE;
$handler->display->display_options['fields']['field_contributions_donations']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_contributions_donations']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_contributions_donations']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_contributions_donations']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_contributions_donations']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_contributions_donations']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_contributions_donations']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_contributions_donations']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_contributions_donations']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_contributions_donations']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_contributions_donations']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_contributions_donations']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_contributions_donations']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_contributions_donations']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_contributions_donations']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_contributions_donations']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_contributions_donations']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['field_contributions_donations']['field_api_classes'] = 0;
/* Veld: Inhoud: Project */
$handler->display->display_options['fields']['field_contributions_project']['id'] = 'field_contributions_project';
$handler->display->display_options['fields']['field_contributions_project']['table'] = 'field_data_field_contributions_project';
$handler->display->display_options['fields']['field_contributions_project']['field'] = 'field_contributions_project';
$handler->display->display_options['fields']['field_contributions_project']['relationship'] = 'reverse_field_contributions_donations_node';
$handler->display->display_options['fields']['field_contributions_project']['label'] = '';
$handler->display->display_options['fields']['field_contributions_project']['exclude'] = TRUE;
$handler->display->display_options['fields']['field_contributions_project']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_contributions_project']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_contributions_project']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_contributions_project']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_contributions_project']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['field_contributions_project']['type'] = 'node_reference_plain';
$handler->display->display_options['fields']['field_contributions_project']['field_api_classes'] = 0;
/* Veld: Inhoud: Amount */
$handler->display->display_options['fields']['field_contributions_amount']['id'] = 'field_contributions_amount';
$handler->display->display_options['fields']['field_contributions_amount']['table'] = 'field_data_field_contributions_amount';
$handler->display->display_options['fields']['field_contributions_amount']['field'] = 'field_contributions_amount';
$handler->display->display_options['fields']['field_contributions_amount']['relationship'] = 'reverse_field_contributions_donations_node';
$handler->display->display_options['fields']['field_contributions_amount']['label'] = 'Contributions amount';
$handler->display->display_options['fields']['field_contributions_amount']['exclude'] = TRUE;
$handler->display->display_options['fields']['field_contributions_amount']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_contributions_amount']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_contributions_amount']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_contributions_amount']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_contributions_amount']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_contributions_amount']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_contributions_amount']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_contributions_amount']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_contributions_amount']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_contributions_amount']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_contributions_amount']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_contributions_amount']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_contributions_amount']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_contributions_amount']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_contributions_amount']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_contributions_amount']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_contributions_amount']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['field_contributions_amount']['settings'] = array(
'thousand_separator' => ' ',
'decimal_separator' => '.',
'scale' => '2',
'prefix_suffix' => 1,
);
$handler->display->display_options['fields']['field_contributions_amount']['field_api_classes'] = 0;
/* Sort criterion: Inhoud: Donor (Name) (field_donations_donor) */
$handler->display->display_options['sorts']['field_donations_donor_nid']['id'] = 'field_donations_donor_nid';
$handler->display->display_options['sorts']['field_donations_donor_nid']['table'] = 'field_data_field_donations_donor';
$handler->display->display_options['sorts']['field_donations_donor_nid']['field'] = 'field_donations_donor_nid';
/* Contextual filter: Inhoud: Project (field_contributions_project) */
$handler->display->display_options['arguments']['field_contributions_project_nid']['id'] = 'field_contributions_project_nid';
$handler->display->display_options['arguments']['field_contributions_project_nid']['table'] = 'field_data_field_contributions_project';
$handler->display->display_options['arguments']['field_contributions_project_nid']['field'] = 'field_contributions_project_nid';
$handler->display->display_options['arguments']['field_contributions_project_nid']['relationship'] = 'reverse_field_contributions_donations_node';
$handler->display->display_options['arguments']['field_contributions_project_nid']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['field_contributions_project_nid']['default_argument_skip_url'] = 0;
$handler->display->display_options['arguments']['field_contributions_project_nid']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['field_contributions_project_nid']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['field_contributions_project_nid']['summary_options']['items_per_page'] = '25';
$handler->display->display_options['arguments']['field_contributions_project_nid']['break_phrase'] = 0;
$handler->display->display_options['arguments']['field_contributions_project_nid']['not'] = 0;
/* Filter criterion: Inhoud: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'donations' => 'donations',
);
$handler->display->display_options['filters']['type']['group'] = 0;
/* Filter criterion: Inhoud: Gepubliceerd */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 0;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;

/* Display: Group By Donors */
$handler = $view->new_display('block', 'Group By Donors', 'block_1');
$handler->display->display_options['defaults']['fields'] = FALSE;
/* Veld: Inhoud: Titel */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['exclude'] = TRUE;
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['external'] = 0;
$handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['title']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['element_label_colon'] = 1;
$handler->display->display_options['fields']['title']['element_default_classes'] = 1;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Veld: Inhoud: MoneyAmount(Net) */
$handler->display->display_options['fields']['field_donations_money_amount_net']['id'] = 'field_donations_money_amount_net';
$handler->display->display_options['fields']['field_donations_money_amount_net']['table'] = 'field_data_field_donations_money_amount_net';
$handler->display->display_options['fields']['field_donations_money_amount_net']['field'] = 'field_donations_money_amount_net';
$handler->display->display_options['fields']['field_donations_money_amount_net']['label'] = 'Donations MoneyAmount(Net)';
$handler->display->display_options['fields']['field_donations_money_amount_net']['exclude'] = TRUE;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_donations_money_amount_net']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_donations_money_amount_net']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_donations_money_amount_net']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['field_donations_money_amount_net']['field_api_classes'] = 0;
/* Veld: Inhoud: Donor (Name) */
$handler->display->display_options['fields']['field_donations_donor']['id'] = 'field_donations_donor';
$handler->display->display_options['fields']['field_donations_donor']['table'] = 'field_data_field_donations_donor';
$handler->display->display_options['fields']['field_donations_donor']['field'] = 'field_donations_donor';
$handler->display->display_options['fields']['field_donations_donor']['label'] = '';
$handler->display->display_options['fields']['field_donations_donor']['exclude'] = TRUE;
$handler->display->display_options['fields']['field_donations_donor']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_donations_donor']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_donations_donor']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_donations_donor']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_donations_donor']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_donations_donor']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['field_donations_donor']['type'] = 'node_reference_plain';
$handler->display->display_options['fields']['field_donations_donor']['field_api_classes'] = 0;
/* Veld: Inhoud: Project */
$handler->display->display_options['fields']['field_contributions_project']['id'] = 'field_contributions_project';
$handler->display->display_options['fields']['field_contributions_project']['table'] = 'field_data_field_contributions_project';
$handler->display->display_options['fields']['field_contributions_project']['field'] = 'field_contributions_project';
$handler->display->display_options['fields']['field_contributions_project']['relationship'] = 'reverse_field_contributions_donations_node';
$handler->display->display_options['fields']['field_contributions_project']['label'] = '';
$handler->display->display_options['fields']['field_contributions_project']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_contributions_project']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_contributions_project']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_contributions_project']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_contributions_project']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_contributions_project']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['field_contributions_project']['field_api_classes'] = 0;
$handler->display->display_options['defaults']['arguments'] = FALSE;
$handler->display->display_options['defaults']['filters'] = FALSE;
/* Filter criterion: Inhoud: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'donations' => 'donations',
);
$handler->display->display_options['filters']['type']['group'] = 0;
/* Filter criterion: Inhoud: Gepubliceerd */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 0;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Inhoud: Donor (Name) (field_donations_donor) */
$handler->display->display_options['filters']['field_donations_donor_nid']['id'] = 'field_donations_donor_nid';
$handler->display->display_options['filters']['field_donations_donor_nid']['table'] = 'field_data_field_donations_donor';
$handler->display->display_options['filters']['field_donations_donor_nid']['field'] = 'field_donations_donor_nid';
$handler->display->display_options['filters']['field_donations_donor_nid']['value'] = array(
66 => '66',
);
$handler->display->display_options['filters']['field_donations_donor_nid']['expose']['operator_id'] = 'field_donations_donor_nid_op';
$handler->display->display_options['filters']['field_donations_donor_nid']['expose']['label'] = 'Donor (Name) (field_donations_donor)';
$handler->display->display_options['filters']['field_donations_donor_nid']['expose']['operator'] = 'field_donations_donor_nid_op';
$handler->display->display_options['filters']['field_donations_donor_nid']['expose']['identifier'] = 'field_donations_donor_nid';
$handler->display->display_options['filters']['field_donations_donor_nid']['expose']['required'] = 1;
$handler->display->display_options['filters']['field_donations_donor_nid']['expose']['remember'] = 1;
$handler->display->display_options['filters']['field_donations_donor_nid']['expose']['reduce'] = 0;
$translatables['Prj_don_donors'] = array(
t('Master'),
t('Donaties'),
t('more'),
t('Apply'),
t('Opnieuw instellen'),
t('Sort by'),
t('Asc'),
t('Desc'),
t('field_contributions_donations'),
t('Titel'),
t('Donations MoneyAmount(Net)'),
t('Gesplitste donation'),
t('Contributions amount'),
t('Alle'),
t('Group By Donors'),
t('Donor (Name) (field_donations_donor)'),
);

print $view->execute_display('default', array());