[gelöst] Views 3 und Mitgliederliste mit Glossarfunktion
am 04.08.2011 - 13:25 Uhr in
Hallo Ihr Lieben,
an irgendeiner Stelle hakt es einfach noch und ich komme auch nach stundenlangem Probieren nicht auf den Denkfehler.
Ich habe für die User zusätzliche Felder eingerichtet. Last Name ist hierbei ein Pflichtfeld. Nun lasse ich in Tabellenform diese Felder wieder per Views ausgeben. Klappt hervorragend.
Ich wollte aber auch noch ein Glossar oben anfügen, dass die Anzahl der Last Names pro Buchstabe zum direkten Anklicken anzeigt, um alles noch ein wenig benutzerfreundlicher zu gestalten. Also flugs ein Attachment angelegt - aber leider zeigt es mit nicht die Buchstaben an, sondern immer <no-value>
und daran anschließend die korrekte Anzahl für den Buchstaben.
Was habe ich wo falsch eingestellt? Hier mal mein exportierter View:
$view = new view;
$view->name = 'members';
$view->description = 'Here all views to display our members are filed.';
$view->tag = 'default';
$view->base_table = 'users';
$view->human_name = 'Members';
$view->core = 7;
$view->api_version = '3.0-alpha1';
$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['use_ajax'] = TRUE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['access']['perm'] = 'access user profiles';
$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['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '36';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
$handler->display->display_options['pager']['options']['expose']['items_per_page_options_all'] = 0;
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['columns'] = array(
'picture' => 'picture',
'field_profile_last_name' => 'field_profile_last_name',
'field_profile_first_name' => 'field_profile_first_name',
'field_profile_birthdate' => 'field_profile_birthdate',
'created' => 'created',
'login' => 'login',
'name' => 'name',
);
$handler->display->display_options['style_options']['default'] = 'field_profile_last_name';
$handler->display->display_options['style_options']['info'] = array(
'picture' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
),
'field_profile_last_name' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
),
'field_profile_first_name' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
),
'field_profile_birthdate' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
),
'created' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
),
'login' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
),
'name' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
),
);
$handler->display->display_options['style_options']['override'] = 1;
$handler->display->display_options['style_options']['sticky'] = 1;
$handler->display->display_options['style_options']['empty_table'] = 0;
/* Field: User: Picture */
$handler->display->display_options['fields']['picture']['id'] = 'picture';
$handler->display->display_options['fields']['picture']['table'] = 'users';
$handler->display->display_options['fields']['picture']['field'] = 'picture';
$handler->display->display_options['fields']['picture']['label'] = '';
$handler->display->display_options['fields']['picture']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['picture']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['picture']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['picture']['alter']['external'] = 0;
$handler->display->display_options['fields']['picture']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['picture']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['picture']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['picture']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['picture']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['picture']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['picture']['alter']['trim'] = 0;
$handler->display->display_options['fields']['picture']['alter']['html'] = 0;
$handler->display->display_options['fields']['picture']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['picture']['element_default_classes'] = 1;
$handler->display->display_options['fields']['picture']['hide_empty'] = 0;
$handler->display->display_options['fields']['picture']['empty_zero'] = 0;
$handler->display->display_options['fields']['picture']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['picture']['imagecache_preset'] = 'exhibit_item_table_preview';
/* Field: User: Last Name */
$handler->display->display_options['fields']['field_profile_last_name']['id'] = 'field_profile_last_name';
$handler->display->display_options['fields']['field_profile_last_name']['table'] = 'field_data_field_profile_last_name';
$handler->display->display_options['fields']['field_profile_last_name']['field'] = 'field_profile_last_name';
$handler->display->display_options['fields']['field_profile_last_name']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_profile_last_name']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_profile_last_name']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_profile_last_name']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_profile_last_name']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_profile_last_name']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_profile_last_name']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_profile_last_name']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_profile_last_name']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_profile_last_name']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_profile_last_name']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_profile_last_name']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_profile_last_name']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_profile_last_name']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_profile_last_name']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_profile_last_name']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_profile_last_name']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['field_profile_last_name']['field_api_classes'] = 0;
/* Field: User: First Name */
$handler->display->display_options['fields']['field_profile_first_name']['id'] = 'field_profile_first_name';
$handler->display->display_options['fields']['field_profile_first_name']['table'] = 'field_data_field_profile_first_name';
$handler->display->display_options['fields']['field_profile_first_name']['field'] = 'field_profile_first_name';
$handler->display->display_options['fields']['field_profile_first_name']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_profile_first_name']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_profile_first_name']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_profile_first_name']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_profile_first_name']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_profile_first_name']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_profile_first_name']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_profile_first_name']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_profile_first_name']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_profile_first_name']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_profile_first_name']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_profile_first_name']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_profile_first_name']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_profile_first_name']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_profile_first_name']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_profile_first_name']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_profile_first_name']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['field_profile_first_name']['field_api_classes'] = 0;
/* Field: User: Birthdate */
$handler->display->display_options['fields']['field_profile_birthdate']['id'] = 'field_profile_birthdate';
$handler->display->display_options['fields']['field_profile_birthdate']['table'] = 'field_data_field_profile_birthdate';
$handler->display->display_options['fields']['field_profile_birthdate']['field'] = 'field_profile_birthdate';
$handler->display->display_options['fields']['field_profile_birthdate']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_profile_birthdate']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_profile_birthdate']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_profile_birthdate']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_profile_birthdate']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_profile_birthdate']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_profile_birthdate']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_profile_birthdate']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_profile_birthdate']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_profile_birthdate']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_profile_birthdate']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_profile_birthdate']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_profile_birthdate']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_profile_birthdate']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_profile_birthdate']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_profile_birthdate']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_profile_birthdate']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['field_profile_birthdate']['settings'] = array(
'format_type' => 'short',
'fromto' => 'both',
'multiple_number' => '',
'multiple_from' => '',
'multiple_to' => '',
'show_repeat_rule' => 'show',
);
$handler->display->display_options['fields']['field_profile_birthdate']['field_api_classes'] = 0;
/* Field: User: Created date */
$handler->display->display_options['fields']['created']['id'] = 'created';
$handler->display->display_options['fields']['created']['table'] = 'users';
$handler->display->display_options['fields']['created']['field'] = 'created';
$handler->display->display_options['fields']['created']['label'] = 'Member since';
$handler->display->display_options['fields']['created']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['created']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['created']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['created']['alter']['external'] = 0;
$handler->display->display_options['fields']['created']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['created']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['created']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['created']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['created']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['created']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['created']['alter']['trim'] = 0;
$handler->display->display_options['fields']['created']['alter']['html'] = 0;
$handler->display->display_options['fields']['created']['element_label_colon'] = 1;
$handler->display->display_options['fields']['created']['element_default_classes'] = 1;
$handler->display->display_options['fields']['created']['hide_empty'] = 0;
$handler->display->display_options['fields']['created']['empty_zero'] = 0;
$handler->display->display_options['fields']['created']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['created']['date_format'] = 'custom';
$handler->display->display_options['fields']['created']['custom_date_format'] = 'F j, Y';
/* Field: User: Last login */
$handler->display->display_options['fields']['login']['id'] = 'login';
$handler->display->display_options['fields']['login']['table'] = 'users';
$handler->display->display_options['fields']['login']['field'] = 'login';
$handler->display->display_options['fields']['login']['label'] = 'Last online';
$handler->display->display_options['fields']['login']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['login']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['login']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['login']['alter']['external'] = 0;
$handler->display->display_options['fields']['login']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['login']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['login']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['login']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['login']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['login']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['login']['alter']['trim'] = 0;
$handler->display->display_options['fields']['login']['alter']['html'] = 0;
$handler->display->display_options['fields']['login']['element_label_colon'] = 1;
$handler->display->display_options['fields']['login']['element_default_classes'] = 1;
$handler->display->display_options['fields']['login']['hide_empty'] = 0;
$handler->display->display_options['fields']['login']['empty_zero'] = 0;
$handler->display->display_options['fields']['login']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['login']['date_format'] = 'short';
/* Filter criterion: User: Active */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'users';
$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: Attachment */
$handler = $view->new_display('attachment', 'Attachment', 'attachment_1');
$handler->display->display_options['defaults']['use_ajax'] = FALSE;
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['pager']['options']['items_per_page'] = '36';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['defaults']['style_options'] = FALSE;
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
$handler->display->display_options['row_plugin'] = 'fields';
$handler->display->display_options['defaults']['row_options'] = FALSE;
$handler->display->display_options['defaults']['arguments'] = FALSE;
/* Contextual filter: User: Last Name (field_profile_last_name) */
$handler->display->display_options['arguments']['field_profile_last_name_value']['id'] = 'field_profile_last_name_value';
$handler->display->display_options['arguments']['field_profile_last_name_value']['table'] = 'field_data_field_profile_last_name';
$handler->display->display_options['arguments']['field_profile_last_name_value']['field'] = 'field_profile_last_name_value';
$handler->display->display_options['arguments']['field_profile_last_name_value']['default_action'] = 'summary';
$handler->display->display_options['arguments']['field_profile_last_name_value']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['field_profile_last_name_value']['default_argument_skip_url'] = 0;
$handler->display->display_options['arguments']['field_profile_last_name_value']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['field_profile_last_name_value']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['field_profile_last_name_value']['summary_options']['items_per_page'] = '26';
$handler->display->display_options['arguments']['field_profile_last_name_value']['specify_validation'] = 1;
$handler->display->display_options['arguments']['field_profile_last_name_value']['glossary'] = 1;
$handler->display->display_options['arguments']['field_profile_last_name_value']['limit'] = '0';
$handler->display->display_options['arguments']['field_profile_last_name_value']['case'] = 'upper';
$handler->display->display_options['arguments']['field_profile_last_name_value']['path_case'] = 'lower';
$handler->display->display_options['arguments']['field_profile_last_name_value']['transform_dash'] = 1;
$handler->display->display_options['arguments']['field_profile_last_name_value']['break_phrase'] = 0;
$handler->display->display_options['displays'] = array(
'page_1' => 'page_1',
'default' => 0,
);
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->display->display_options['path'] = 'our-members.htm';
$handler->display->display_options['menu']['type'] = 'normal';
$handler->display->display_options['menu']['title'] = 'Our Members';
$handler->display->display_options['menu']['description'] = 'A list of all our active members';
$handler->display->display_options['menu']['weight'] = '0';
$handler->display->display_options['menu']['name'] = 'user-menu';
Wie immer freue ich mich auch diesmal über kompetente Vorschläge und/oder Lösungen.
Gurß,
Kirsten
- Anmelden oder Registrieren um Kommentare zu schreiben
Antwort selber gefunden
am 05.08.2011 - 08:32 Uhr
Hallo,
nach langem HinundHer habe ich die eine Einstellung gefunden, die noch nicht korrekt war.... diese muss lauten:
$handler->display->display_options['arguments']['field_profile_last_name_value']['limit'] = '1';
So wird dann auch nur der erste Buchstabe angezeigt und alles funktioniert.
Gruß,
Kirsten
Solange besser möglich ist, ist gut nicht genug.
http://www.net-explorer.org