$view = new view; $view->name = 'amazon_view1'; $view->description = 'amazon_view1'; $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('relationships', array( 'field_amazon_item_asin' => array( 'label' => 'field_amazon_item_asin', 'required' => 1, 'id' => 'field_amazon_item_asin', 'table' => 'node_data_field_amazon_item', 'field' => 'field_amazon_item_asin', 'relationship' => 'none', ), )); $handler->override_option('fields', array( 'nid' => array( 'label' => 'Nid', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'link_to_node' => 1, 'exclude' => 1, 'id' => 'nid', 'table' => 'node', 'field' => 'nid', 'relationship' => 'none', ), 'asin' => array( 'label' => 'ASIN', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'exclude' => 1, 'id' => 'asin', 'table' => 'amazon_item', 'field' => 'asin', 'relationship' => 'field_amazon_item_asin', ), 'title' => array( 'label' => 'Title', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => 'http://localhost/drupal/amazon_store/item/[asin]', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'link_format' => 'node', 'exclude' => 0, 'id' => 'title', 'table' => 'amazon_item', 'field' => 'title', 'relationship' => 'field_amazon_item_asin', ), 'manufacturer' => array( 'label' => 'Manufacturer', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'exclude' => 0, 'id' => 'manufacturer', 'table' => 'amazon_item', 'field' => 'manufacturer', 'relationship' => 'field_amazon_item_asin', ), 'product_image' => array( 'label' => 'Product image', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'image_size' => 'mediumimage', 'link_format' => 'amazon_store', 'exclude' => 0, 'id' => 'product_image', 'table' => 'amazon_item_image', 'field' => 'product_image', 'relationship' => 'field_amazon_item_asin', 'presentation_format' => 'markup', ), 'listpriceformattedprice' => array( 'label' => 'List price', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'empty' => '', 'hide_empty' => 1, 'empty_zero' => 1, 'exclude' => 0, 'id' => 'listpriceformattedprice', 'table' => 'amazon_item', 'field' => 'listpriceformattedprice', 'relationship' => 'field_amazon_item_asin', ), 'invalid_asin' => array( 'label' => 'Valid ASIN?', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'type' => 'yes-no', 'not' => 1, 'exclude' => 0, 'id' => 'invalid_asin', 'table' => 'amazon_item', 'field' => 'invalid_asin', 'relationship' => 'field_amazon_item_asin', ), 'releasedate' => array( 'label' => 'Release date', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'strip_tags' => 0, 'html' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'date_format' => 'default', 'custom_date_format' => '', 'exclude' => 1, 'id' => 'releasedate', 'table' => 'amazon_item', 'field' => 'releasedate', 'relationship' => 'field_amazon_item_asin', ), )); $handler->override_option('sorts', array( 'changed' => array( 'order' => 'DESC', 'granularity' => 'second', 'id' => 'changed', 'table' => 'node', 'field' => 'changed', 'relationship' => 'none', ), 'status' => array( 'order' => 'DESC', 'id' => 'status', 'table' => 'node', 'field' => 'status', 'relationship' => 'none', ), )); $handler->override_option('filters', array( 'type' => array( 'operator' => 'in', 'value' => array( 'amazon_item' => 'amazon_item', ), 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'type', 'table' => 'node', 'field' => 'type', 'relationship' => 'none', ), )); $handler->override_option('access', array( 'type' => 'none', )); $handler->override_option('cache', array( 'type' => 'none', )); $handler->override_option('use_ajax', TRUE); $handler->override_option('use_pager', '1'); $handler->override_option('use_more', 0); $handler->override_option('use_more_always', 0); $handler->override_option('style_plugin', 'table'); $handler = $view->new_display('page', 'Page', 'page_1'); $handler->override_option('path', 'example1'); $handler->override_option('menu', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, ));