Closed (fixed)
Project:
Lightbox2
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Feb 2008 at 21:54 UTC
Updated:
21 Mar 2008 at 14:42 UTC
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
Comment #1
stella commentedTry 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
Comment #2
gdevlugt commentedGreat I'll try it out!
Thanks!
Comment #3
stella commentedReleased in lightbox 2 5.x-2.5 and lightbox 2 6.x-1.5.
Cheers,
Stella
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.