Skip to main content

Post categories

  • Drupal Tips & Tricks
  • Drupal Howtos
  • Drupal Themes
  • X Twitter
  • youtube
Home
Drupal 4U
Drupal Development, Drupal Web Design, Drupal SEO
  • Home
  • Showcases
  • Services
  • Blog
  • Themes
  • About
  • Contact

Breadcrumb

  1. Home
  2. HowTos
  3. Shadowbox gallery displays only the first image on a multi-image field (option "compact")

Shadowbox gallery displays only the first image on a multi-image field (option "compact")

HowTos
June 13, 2014
Profile picture for user drupal
By drupal
  • facebook-f
  • twitter
  • envelope
  • print
7

In 7.x-3.0-beta5 version a new compact parameter has been added to the shadowbox formatter. So if you have an image field (multimage, accepts more than 1 image) and you set its formatter as shadowbox with gallery type and compact checked, you will get a gallery in which only the first image thumbnail is displayed and when you click on it shadowbox is opened and you can view all the images there.

https://drupal.org/node/1107162

However, this function apparently does not work properly. Yes, only the first image thumbnail is shown, but when you click you can only see the first image in the shadowbox gallery. The cause is apparently a bug in the shadowbox module.

https://drupal.org/node/2106133

The problem is very easily fixed by editing one line of the file shadowbox.module

https://drupal.org/node/1980380

diff --git a/shadowbox.module b/shadowbox.module

index 9531a81..3b05b1d 100644

--- a/shadowbox.module

+++ b/shadowbox.module

@@ -555,5 +555,5 @@ function theme_shadowbox_formatter($variables) {

$wrapper_classes = ($gallery_id != '') ? "sb-image sb-gallery sb-gallery-$gallery_id" : 'sb-image sb-individual';

- return '' . $output . '';

+ return '' . $output . '';

}

Shadowbox gallery displays only the first image on a multi-image field (option "compact")
Troubleshooting

Read more articles

Newer
How to make the Drupal superfish menu work properly with the Drupal theme MD Alpine (7.x-2.6 )
Older
The sharing URL link does not show the thumbnail image on Facebook
  • Log in to post comments
Profile picture for user drupal
drupal
7
1
min read
A- A+
  • facebook-f
  • twitter
  • envelope
  • print

Contact Drupal 4U

Get in touch for questions and our Drupal development, design and SEO services.

Contact Us

We aim to reply the latest within 48h.

About Drupal 4U

We are a group of Drupal designers, developers and webmasters and we launched this website to share our experience and knowledge with you. Drupal is a free software package that allows you to easily organize, manage and publish your content, with an endless variety of customization. Drupal is open source software maintained and developed by a very large community of developers and users.

  • X Twitter
  • youtube

Drupal Services

  • Drupal Web Design
  • Drupal Development
  • Drupal SEO
  • Drupal Migration

Drupal 4U

  • Services
  • Showcases
  • Themes
  • Blog
  • About

Drupal Links

  • Official Drupal Website
  • Drupal Answers
  • More Than Themes
  • Theme Forest
  • DXPR: Drupal for Marketers
2012 - 2025, Drupal 4U

Footer menu

  • Contact
Home
Drupal 4U
Drupal Development, Drupal Web Design, Drupal SEO
  • Home
  • Showcases
  • Services
  • Blog
  • Themes
  • About
  • Contact
Clear keys input element