Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.8
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
1 Mar 2010 at 12:12 UTC
Updated:
10 Sep 2013 at 15:11 UTC
Hi,
I am trying to display a block of glossary terms using the default glossary terms view. I can create the page view but not a block view of glossary terms. I have read a previous post (http://drupal.org/node/277321) which instructs me to add block type to the attachments tab. I have done this but still no block is displayed after I have created the block view and added it to display in the right side bar in block settings page.
Any ideas?
Comments
Comment #1
dawehnerI think it would be cool, if you could try to make a importable version for other people and paste this export here.
Then it is possible to explain, what you did wrong.
Comment #2
spuggy commentedHi, below is the default view export.
Another problem is that the header repeats on certain pages. (eg it should display: 'Below is a list...' but it displays twice 'Below is a list... Below is a list...')
Any help or sufggestions will be appreciated
$view = new view;
$view->name = 'glossary_alphabet_business_nodes';
$view->description = 'A list of all content, by letter.';
$view->tag = 'default';
$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' => '',
'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' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
),
'name' => array(
'label' => 'Term',
'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_taxonomy' => 1,
'exclude' => 0,
'id' => 'name',
'table' => 'term_data',
'field' => 'name',
'relationship' => 'none',
),
));
$handler->override_option('arguments', array(
'title' => array(
'default_action' => 'empty',
'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',
'glossary' => 1,
'limit' => '1',
'case' => 'upper',
'path_case' => 'lower',
'transform_dash' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
'default_argument_user' => 0,
'default_argument_fixed' => 'a',
'default_argument_php' => '',
'validate_argument_vocabulary' => array(
'5' => 0,
'7' => 0,
'2' => 0,
'4' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_php' => '',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
'2' => 0,
),
'default_options_div_prefix' => '',
'default_argument_image_size' => '_original',
'validate_argument_node_type' => array(
'webform' => 0,
'poll' => 0,
'ad' => 0,
'image' => 0,
'forum' => 0,
'business_node' => 0,
'page' => 0,
'simplenews' => 0,
'story' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_transform' => 0,
'validate_user_restrict_roles' => 0,
'image_size' => array(
'_original' => '_original',
'thumbnail' => 'thumbnail',
'preview' => 'preview',
),
),
));
$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(
'business_node' => 'business_node',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
'role' => array(),
'perm' => '',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('title', 'Business category glossary');
$handler->override_option('header', 'Below is an alphabetical listing of all business names in our directory. Click on one of the letters and it will take you to a page with all the businesses starting with that latter.');
$handler->override_option('header_format', '1');
$handler->override_option('header_empty', 0);
$handler->override_option('footer_format', '1');
$handler->override_option('footer_empty', 0);
$handler->override_option('items_per_page', 36);
$handler->override_option('use_pager', '1');
$handler->override_option('distinct', 1);
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 0,
'order' => 'asc',
'columns' => array(
'title' => 'title',
'field_description_value' => 'field_description_value',
'name' => 'name',
),
'info' => array(
'title' => array(
'sortable' => 0,
'separator' => '',
),
'field_description_value' => array(
'sortable' => 0,
'separator' => '',
),
'name' => array(
'sortable' => 0,
'separator' => '',
),
),
'default' => '-1',
));
$handler = $view->new_display('page', 'Page', 'page');
$handler->override_option('path', 'glossary');
$handler->override_option('menu', array(
'type' => 'normal',
'title' => 'Glossary',
'description' => '',
'weight' => '0',
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
));
$handler = $view->new_display('attachment', 'Attachment', 'attachment');
$handler->override_option('arguments', array(
'title' => array(
'default_action' => 'summary asc',
'style_plugin' => 'unformatted_summary',
'style_options' => array(
'count' => 1,
'override' => 0,
'items_per_page' => '25',
'inline' => 1,
'separator' => ' | ',
),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '',
'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',
'relationship' => 'none',
'default_argument_user' => 0,
'default_argument_fixed' => 'a',
'validate_argument_vocabulary' => array(),
'validate_argument_php' => '',
),
));
$handler->override_option('attachment_position', 'before');
$handler->override_option('inherit_arguments', 0);
$handler->override_option('inherit_exposed_filters', 1);
$handler->override_option('inherit_pager', FALSE);
$handler->override_option('render_pager', TRUE);
$handler->override_option('displays', array(
'default' => 'default',
'page' => 'page',
'block_1' => 'block_1',
));
Comment #3
esmerel commentedComment #4
kipper commentedhi, sorry for me english...
glossary view of views 2.8 not work!
using views 2.7! ...is OK!!!
Ciao
Kipper
Comment #5
dawehnerOK. But whats not working... please asume that the other people might not know whats wrong.
Comment #6
dgastudio commentedit works but..
- u can't remove PAGE display from view.
- u can't display the glossary in block or via $view = views_get_view.
- be careful using auto_nodetitle. Dont left white space at begin of config.
Comment #7
dawehnerThats just not true.l
Comment #8
merlinofchaos commentedYou may need to make sure that your block display has a default argument like the page display does (the configuration of the argument in the glossary view is very subtle and critical to its configuration).
Another easy fix might be to add empty text to the block display. Blocks that have no results are hidden from display (even with attachments) so just adding whitespace for the empty text would be enough.
Comment #9
dgastudio commenteddereine: no problem. try to make it work with ajax support.
Comment #10
kipper commentedHi,
I want to talk about an issue on view glossary (by letters) on the internationalization I18n module (loaded via AJAX).
Scenario:
I'm working with two interfaces: Italian (default) and English (2nd language). When I'm operating in the Italian interface and I click on every single alphabetical letter the results are rendered while if I do the same operation in the English interface, when I click on every single letter I get no rendering at all.
It's a long time I try to solve this problem so if someone can give me a hand, I would appreciate that very much.
M thanks,
Kipper
Comment #12
Marko B commentedKipper, did you solve that issue so far? I have the same problem now, with latest views 2 branch?
Comment #13
ronaldbijker commentedI set 'Exposed form style' in advanced setting to: 'Input required'. This did the trick for me.
Comment #14
mahipal46 commentedHi
First clone default glossary view.then provide your view name.after from page tab add block then provide your filter and fields and in attachment attach to : select your block disable master after that see your block result view it works..
Comment #15
bradallenfisher commentedThis is the trick. @ronaldbijker.
@mahipal46 you have replied like that in several posts i am wondering if you are reading the actual problem? It is not that the view doesn't show in preview, it is when you actually try to place the block in a region.