Hi,

First of all, great module.

However, I did notice that on my front page, with several teasers of cck node types (using imagefield), that all images on the front page were grouped together.

I think in most cases, the wanted behaviour is to have the module group images per node.

One way I fixed it was by changing theme_imagefield_image_imagecache_lightbox2() to :

function theme_imagefield_image_imagecache_lightbox2($view_preset, $field, $item, $attributes = NULL) {
  $rel = 'lightbox';
  if (variable_get('lightbox2_image_group', TRUE)) {
    // Added $item['nid'] to group images per node.
    $rel = 'lightbox['. $field['field_name'] . $item['nid'] . ']';
  }
...

It's a quick hack (atm am unable to properly prepare a patch) and might conflict with other implementations of this module, but perhaps it could be a setting?

Comments

stella’s picture

Status: Active » Fixed

Try out the latest dev release (available later today). There is a new configurable option - "Group Imagefields by Node Id" on admin/settings/lightbox2/automatic underneath the "Imagefield settings" collapsible fieldset.

Cheers,
Stella

gdevlugt’s picture

Great I'll try it out!

Thanks!

stella’s picture

Released in lightbox 2 5.x-2.5 and lightbox 2 6.x-1.5.

Cheers,
Stella

Anonymous’s picture

Status: Fixed » Closed (fixed)

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