Hey,
I've tried searching the forums a bit for this but I can't seem to find a simple solution. I have seen many people post requests about this issue, sadly, nobody answered them. I have a standard view of an array of images, uploaded to the node through a cck imagefield. The images appear fine, but when I make the view to have style "grid" the images still appear as a list, one after the other. Specifying different column widths (2, 3, 4, 5) makes zero change. Also changing the style from vertical to horizontal also has no change. I'm trying to get these images to appear in a grid. In d5 its easy with a bit of argument code...but do I have to do the same thing with d6?
Please let me know.
The images appear fine, but just not formatted in the grid. The grid options make no change. Is there a common solution to this problem?
Thanks
Comments
Comment #1
merlinofchaos commentedMy guess is that whatever module is giving you the images is showing you all images in one field, when what you really want is one image per row. This isn't a problem with the grid style, it's an issue with the field. And for that, you'll need to go to the module that provides it.
Comment #2
rc2020 commentedMerlin,
I have done my best to search high and low before reopening this issue, as I want to make sure that it is not some other issue before reopening, but I believe that your original assessment of this issue might be mistaken. After much searching and playing around with the views, modifying displays, deleting the view, recreating the view, trying to play with the theming output, nothing seems to change. These images are provided by imagefield, the display field settings are all in order, and that module is stable. I have successfully built tons of imagefield galleries in Drupal 5, using views bonus: grid view, with some argument code: $view->gridcount = "somenumber"; . As grid view is now stock in views for d6, it would make sense that using such a common module (imagefield) along with views should be basic drupaling, and I can't imagine that uploading images in imagefield seems to prevent views from putting the images in a grid, especially considering it was so straightforward in d5.
You can see the page with the images being in a list being described here:
http://www.lynchtree.foodmoney.glexia.net/node/3
You can clearly see the thumbnail images appearing one after another, instead of in a view. What's interesting, however, is when you firebug the images, you see the table class of "views-view-grid" and the sub
Also, I have tried switching themes to garland to test in case there was some table css conflict that forced it to appear as a list format, which made no change. Both themes were the same.
This is for a commercial project and I really don't want to have to scrap the views and manually assemble all of the images and make thumbnails w/o imagecache and imagefield. Can you please possibly take another look?
Thank you very much!
Comment #3
merlinofchaos commentedAll right. I clicked on that link and I don't see any images at all.
First, let's get an export of the view and see what it is you're actually working with.
Comment #4
rc2020 commentedSorry Merlin, the permissions were off for those fields, I keep forgetting d6 disables access by default. They're enabled for anonymous users.
Here is the exported code for the view: Thanks again for taking a look at this!
$view = new view;
$view->name = 'thumbnail_images';
$view->description = '';
$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(
'field_imgpreview_fid' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'thumbnail][thickbox',
'multiple' => array(
'group' => 1,
'multiple_number' => '9',
'multiple_from' => '',
'multiple_reversed' => 0,
),
'exclude' => 0,
'id' => 'field_imgpreview_fid',
'table' => 'node_data_field_imgpreview',
'field' => 'field_imgpreview_fid',
'relationship' => 'none',
),
));
$handler->override_option('arguments', array(
'nid' => array(
'default_action' => 'ignore',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'break_phrase' => 0,
'not' => 0,
'id' => 'nid',
'table' => 'node',
'field' => 'nid',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
'2' => 0,
),
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'panel' => 0,
'page' => 0,
'simplenews' => 0,
'story' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'2' => 0,
'1' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_transform' => 0,
'validate_user_restrict_roles' => 0,
'validate_argument_php' => '',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('items_per_page', 9);
$handler->override_option('style_plugin', 'grid');
$handler->override_option('style_options', array(
'grouping' => '',
'columns' => '3',
'alignment' => 'horizontal',
));
$handler->override_option('row_options', array(
'inline' => array(),
'separator' => '',
));
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);
Comment #5
rc2020 commentedMerlin,
Went on the IRC channel, and some fine fellow suggested I turn off "group multiple values" on the view, which I guess causes a new line for every item. This solved the problem!!
I hope this got to you before you spent a lot of time on it.
I might suggest some method of letting users know selecting that item causes this behavior, on d5 I believe it would not do this with views. I hope someone else can learn from this in the mean time, but thank you again for taking a look!!!
Thanks!!!
Comment #6
virtualgirl commentedCouldnt get it to work with the grouping off, do you have to remake the view and the contents after you turn off the grouping? any comments would help thank you, bleeding eyes getting bleek on this one several hours of ungridded in rows images still as a list, anyone?
Comment #7
rc2020 commentedThe thing which made it work was turning the grouping off, truthfully I'm not quite sure why that worked all I know is that is what worked once it was turned off. Perhaps try remaking the view?
Comment #8
ge commentedI have the same issue with a View that displays all taxonomy items that have any content attached to them. It's the home page of our intranet site. I cannot get the items to display in a grid no matter how many columns I assign. They always appear as a plain HTML list.
Comment #9
dawehnerAre you sure, that you wanted to use row style node?
This cannot cause a nice looking grid, this is the same view with fields as row style.
Comment #10
esmerel commentedNo activity for 6 months.
Comment #11
zinasahib commentedHello....
In the beginning, thank you so much for this post, I was going crazy when the horizontal/vertical option aligns everything vertically, and i could not find anything that clearly describes my problem as this post.
I still run this problem. I tried the grouping option mentioned above, it worked, but now I have 3 columns (i picked 3 columns) that display thumbnail of images, but they are not aligned at all!!! looks funny and bad. Where can I align it?
I've been hitting my head to the wall for the past couple of days, this seriously is sad, very sad.
I'd appreciate any help!
Thanks
Comment #12
merlinofchaos commented1) alignment is CSS
2) It's not cool to re-open only barely related issues with basically new support requests. It confuses pretty much everyone.