Hello,

I'm currently using views 3.x on Drupal 7, and was wondering if anyone had any tips for doing this.

Currently, I have a node type with an image field where users can upload up to 5 images. When I try to display those images using views, they currently align themselves vertically in a column. Is there a way to get them to align horizontally, or in a grid, so that they don't take up so much vertical space? There don't appear to be any formatting options for the individual images in an image field.

Comments

gausarts’s picture

You may need to theme it. If using list style, I think this will do:

.view-NAME .item-list ul li{
float:left;
margin:5px;
}
MJH’s picture

I have the same problem: Up to 10 images are saved in a node.

With Views 6 / Imagefield it was possible to show one image per table / grid – field.
Now with Views 7 / Image Field Core all images of a node are shown in one field of a table / grid. All aligned under each other:

[X
X
X
X
X]

I would like it to look like this:
[X] [X] [X]
[X] [X]

X: Image
[ ]: Field of a table / grid

In views 6 there was an option “Group multiple values”. If checked, it caused the same behavior (all images of a node in one field). If unchecked, each image was in its own field.

Is there a similar option in Views 7?

dawehner’s picture

Yes there is a smiliar option in the dev version of views.

goldlilys’s picture

This was just what i was looking for ... thanks for telling me it's in the dev version. Wonder when it will be applied to new version?

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

Please try out the dev version and report whether it works for you.

NathanM’s picture

The dev version works great for me. I think this can be closed now.

dawehner’s picture

Status: Postponed (maintainer needs more info) » Fixed

Cool. Thanks for reporting it.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

rhabibi’s picture

I also want this, any one please help me.
cheers

mazoerkam’s picture

this is what i need but i don't know how to... : :D

calbert’s picture

I installed the dev and I don't see anyway to change my photo gallery view from

X
X
X
X

to

X X X
X X X

In the grid view.

calbert’s picture

Status: Closed (fixed) » Active

Any updates here, I could really use some help with this??

With the Dev install I am still stuck with

X
X
X
X

Not

X X X
X X X

dawehner’s picture

By the default the image field are displayed all in the same grid cell. To be able to change this goto the field in views and change the settings.

There you will see "SHOWMULTIPLE FIELD SETTINGS". Once you have unchecked "Display all values in the same row" it might work for your as you want.

calbert’s picture

I don't see "SHOWMULTIPLE FIELD SETTINGS" in fact I don't see any new options once I switched over to the dev view ..

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

Believe me or not, but it's hard to figure out what you did and what you wanted to achieve.

I'm wondering how your view looks like. Could you be so kind and export your view? It would answer how you have configured it.

calbert’s picture

$view = new view;
$view->name = 'gallery';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Gallery';
$view->core = 7;
$view->api_version = '3.0';
$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['title'] = 'Gallery';
$handler->display->display_options['use_ajax'] = TRUE;
$handler->display->display_options['access']['type'] = 'role';
$handler->display->display_options['access']['role'] = array(
  3 => '3',
  2 => '2',
  4 => '4',
);
$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'] = '10';
$handler->display->display_options['style_plugin'] = 'grid';
$handler->display->display_options['style_options']['fill_single_line'] = 1;
$handler->display->display_options['row_plugin'] = 'node';
$handler->display->display_options['row_options']['links'] = 1;
$handler->display->display_options['row_options']['comments'] = 0;
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
$handler->display->display_options['sorts']['created']['granularity'] = 'minute';
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$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;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
  'photo_gallery' => 'photo_gallery',
);
$handler->display->display_options['filters']['type']['group'] = '0';

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'gallery';
$handler->display->display_options['menu']['type'] = 'normal';
$handler->display->display_options['menu']['title'] = 'Gallery';
$handler->display->display_options['menu']['weight'] = '6';
$handler->display->display_options['menu']['name'] = 'main-menu';
calbert’s picture

Any thoughts?

esmerel’s picture

Status: Postponed (maintainer needs more info) » Active
calbert’s picture

Any update on this, I see somebody posted.

damiankloip’s picture

You only have a title in this view export?

mustanggb’s picture

Issue summary: View changes
Status: Active » Fixed

Restoring status, please open a new issue if you're still having problems.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.