A problem arises when only one image is attached to the node, the slideshow transitions between the same image creating a slow flash effect. It would be handy if the slideshow behavior only applied to nodes with multiple images.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

letrotteur’s picture

Looking for this kind of behavior too. Anyone has ideas on how to accomplish this?

Marc-Antoine’s picture

Here's my approach:

If a single picture gallery is detected, change the main picture's container from 'a' to 'div' and remove the thumbnail pager (no need to show a single thumbnail).

tell me what you think, is that what you had in mind?

Marc-Antoine’s picture

Status: Active » Needs review

changing the status

Marc-Antoine’s picture

Here's a better handling of the number of pictures in the .js, you should use this patch

acouch’s picture

Version: 7.x-1.0-beta3 » 7.x-1.x-dev
Category: bug » feature
Status: Needs review » Needs work
FileSize
3.13 KB

I don't think it is better to have no thumbnail than one.

However, I would accept this if the logic for the display was moved from the template to the preprocess function and there was a setting in the Gallery settings that didn't hide the thumbnail by default. I made some changes recently so re-rolled in case you want to keep working on this.

Marc-Antoine’s picture

Indeed the best handling would be to enable such an option, I will see if I have some time to work on this. Thank you for answering.

Marc-Antoine’s picture

Hey there, I worked on a new patch for you, it adds a 'hide single picture's thumbnail' option within the view's format.

The default state of this option is 'no' (therefore not hiding a single thumbnail) as you requested.

Also, the single thumbnail is still clickable, I don't know what you think about that behavior, and I didn't want to change it until you said something about it.

I attached a screenshot (sorry for the french interface) of the option within it's form.

Have a good day!

*edit*

This option still acts on the template though, since I haven't found a clever way of preventing the gallery from displaying it's thumbnail elsewhere.

Marc-Antoine’s picture

Status: Needs work » Needs review

changing the status

acouch’s picture

Marc, your english is great and approach sound. It will be a bit before I get to update the module but will try and include this when I can.

Marc-Antoine’s picture

Thank you, I'm eager to see what you have to say about the patch.

Here's a new version (minor bug corrected). Also I realized most of your options' boolean values are in fact string types, while mine are not (true instead of 'true'), perhaps I should rewrite the patch for the sake of consistency?

See you later!

Marc-Antoine’s picture

Corrected a corner case bug

Marc-Antoine’s picture

Version: 7.x-1.x-dev » 7.x-1.1
FileSize
4.62 KB

Rerolled the patch to be applied against the 7.x-1.1

alexandrezia’s picture

Issue summary: View changes
FileSize
4.67 KB

Rerolling the patch to apply against 7.x-1.x bc9ae19a8f0343c897ab34b24ea6c96da2a953d2