Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $view = new view;
- $view->name = 'icon';
- $view->description = 'Display icon on pages';
- $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(
- 'nid' => array(
- 'label' => 'Image file',
- 'required' => 0,
- 'image_size' => array(
- 'thumbnail' => 'thumbnail',
- ),
- 'id' => 'nid',
- 'table' => 'image_node',
- 'field' => 'nid',
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('fields', array(
- 'field_course_icon_fid' => array(
- 'label' => 'Course icon',
- '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,
- 'html' => 0,
- 'strip_tags' => 0,
- ),
- 'empty' => '',
- 'hide_empty' => 0,
- 'empty_zero' => 0,
- 'link_to_node' => 0,
- 'label_type' => 'widget',
- 'format' => 'default',
- 'multiple' => array(
- 'group' => TRUE,
- 'multiple_number' => '',
- 'multiple_from' => '',
- 'multiple_reversed' => FALSE,
- ),
- 'exclude' => 0,
- 'id' => 'field_course_icon_fid',
- 'table' => 'node_data_field_course_icon',
- 'field' => 'field_course_icon_fid',
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('arguments', array(
- 'field_course_icon_fid' => array(
- 'default_action' => 'ignore',
- 'style_plugin' => 'default_summary',
- 'style_options' => array(),
- 'wildcard' => 'all',
- 'wildcard_substitution' => 'All',
- 'title' => '',
- 'breadcrumb' => '',
- 'default_argument_type' => 'fixed',
- 'default_argument' => '',
- 'validate_type' => 'none',
- 'validate_fail' => 'not found',
- 'break_phrase' => 0,
- 'not' => 0,
- 'id' => 'field_course_icon_fid',
- 'table' => 'node_data_field_course_icon',
- 'field' => 'field_course_icon_fid',
- 'validate_user_argument_type' => 'uid',
- 'validate_user_roles' => array(
- '2' => 0,
- ),
- 'relationship' => 'none',
- 'default_options_div_prefix' => '',
- 'default_argument_fixed' => '',
- 'default_argument_user' => 0,
- 'default_argument_image_size' => '_original',
- 'default_argument_php' => '',
- 'validate_argument_node_type' => array(
- 'poll' => 0,
- 'image' => 0,
- 'book' => 0,
- 'demo_featured' => 0,
- 'event' => 0,
- 'full_time_course' => 0,
- 'job' => 0,
- 'news' => 0,
- 'page' => 0,
- 'webform' => 0,
- ),
- 'validate_argument_node_access' => 0,
- 'validate_argument_nid_type' => 'nid',
- 'validate_argument_vocabulary' => array(
- '1' => 0,
- '2' => 0,
- ),
- 'validate_argument_type' => 'tid',
- 'validate_argument_transform' => 0,
- 'validate_user_restrict_roles' => 0,
- 'image_size' => array(
- '_original' => '_original',
- 'thumbnail' => 'thumbnail',
- 'preview' => 'preview',
- ),
- 'validate_argument_php' => '',
- ),
- ));
- $handler->override_option('access', array(
- 'type' => 'none',
- ));
- $handler->override_option('cache', array(
- 'type' => 'none',
- ));
- $handler->override_option('items_per_page', 1);
- $handler->override_option('row_options', array(
- 'inline' => array(),
- 'separator' => '',
- 'hide_empty' => 0,
- ));
- $handler = $view->new_display('block', 'Block', 'block_1');
- $handler->override_option('fields', array(
- 'field_course_icon_fid' => array(
- 'label' => 'Course icon',
- '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,
- 'html' => 0,
- 'strip_tags' => 0,
- ),
- 'empty' => '',
- 'hide_empty' => 0,
- 'empty_zero' => 0,
- 'link_to_node' => 0,
- 'label_type' => 'widget',
- 'format' => 'default',
- 'multiple' => array(
- 'group' => TRUE,
- 'multiple_number' => '',
- 'multiple_from' => '',
- 'multiple_reversed' => FALSE,
- ),
- 'exclude' => 0,
- 'id' => 'field_course_icon_fid',
- 'table' => 'node_data_field_course_icon',
- 'field' => 'field_course_icon_fid',
- 'override' => array(
- 'button' => 'Use default',
- ),
- 'relationship' => 'none',
- ),
- ));
- $handler->override_option('block_description', '');
- $handler->override_option('block_caching', -1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement