Skip to content

Instantly share code, notes, and snippets.

@zachseifts
Created June 3, 2011 19:06
Show Gist options
  • Save zachseifts/1006954 to your computer and use it in GitHub Desktop.
Save zachseifts/1006954 to your computer and use it in GitHub Desktop.
$view = new view;
$view->name = 'programs_index';
$view->description = 'An A-Z index for Programs and Services';
$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' => '',
'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' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'title' => array(
'order' => 'ASC',
'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',
),
'type' => array(
'operator' => 'in',
'value' => array(
'program' => 'program',
),
'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('items_per_page', 0);
$handler = $view->new_display('page', 'Glossary Page', 'page_2');
$handler->override_option('arguments', array(
'title' => array(
'default_action' => 'not found',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => 'Programs & Services beginning with "%1"',
'breadcrumb' => '',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'glossary' => 1,
'limit' => '1',
'case' => 'upper',
'path_case' => 'lower',
'transform_dash' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
'2' => 0,
'3' => 0,
'5' => 0,
'6' => 0,
'4' => 0,
'7' => 0,
),
'override' => array(
'button' => 'Use default',
),
'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(
'image' => 0,
'panel' => 0,
'aggregated_event' => 0,
'aggregated_news_item' => 0,
'external_events_feed' => 0,
'external_news_feed' => 0,
'feed' => 0,
'feed_item' => 0,
'news_item' => 0,
'page' => 0,
'partner' => 0,
'picture' => 0,
'program' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'3' => 0,
'4' => 0,
'2' => 0,
'5' => 0,
'1' => 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('footer', '<a href="/programs" title="View All Programs">View All Programs</a>');
$handler->override_option('footer_format', '1');
$handler->override_option('footer_empty', 1);
$handler->override_option('style_plugin', 'list');
$handler->override_option('style_options', array(
'grouping' => '',
'type' => 'ul',
));
$handler->override_option('path', 'programs/all/%');
$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,
'name' => 'navigation',
));
$handler = $view->new_display('block', 'Legend Block', 'block_1');
$handler->override_option('arguments', array(
'title' => array(
'default_action' => 'summary asc',
'style_plugin' => 'default_summary',
'style_options' => array(
'count' => 0,
'override' => 0,
'items_per_page' => '25',
),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '',
'breadcrumb' => '',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'glossary' => 1,
'limit' => '1',
'case' => 'none',
'path_case' => 'lower',
'transform_dash' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
'2' => 0,
'3' => 0,
'5' => 0,
'6' => 0,
'4' => 0,
'7' => 0,
),
'override' => array(
'button' => 'Use default',
),
'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(
'image' => 0,
'panel' => 0,
'aggregated_event' => 0,
'aggregated_news_item' => 0,
'external_events_feed' => 0,
'external_news_feed' => 0,
'feed' => 0,
'feed_item' => 0,
'news_item' => 0,
'page' => 0,
'partner' => 0,
'picture' => 0,
'program' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'3' => 0,
'4' => 0,
'2' => 0,
'5' => 0,
'1' => 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('header', '<p>Browse to the Program or Service by it\'s first letter.</p>');
$handler->override_option('header_format', '1');
$handler->override_option('header_empty', 1);
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment