Including a previous - next button support will be awesome feature for this module, after which it will act as standalone module for creating slideshows. Currently, we can cannot control the slideshow apart from slideshow effects.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

navneet0693 created an issue. See original summary.

joshi.rohit100’s picture

Status: Active » Needs review
FileSize
2.99 KB

Needs to have a twig variable for buttons. Added a todo for twig variable

heykarthikwithu’s picture

Assigned: Unassigned » heykarthikwithu
heykarthikwithu’s picture

Assigned: heykarthikwithu » Unassigned
FileSize
4.32 KB
3.14 KB

@joshi.rohit100 and @navneet0693, as per #2 added the one's mentioned in todo, Please check this :)

joshi.rohit100’s picture

+++ b/src/Plugin/Field/FieldFormatter/ImagefieldSlideshowFieldFormatter.php
@@ -95,6 +95,7 @@ class ImagefieldSlideshowFieldFormatter extends ImageFormatterBase implements Co
       'imagefield_slideshow_style_pause' => '1',
+      'imagefield_slideshow_prev_next' => TRUE,
     ) + parent::defaultSettings();

shouldn't this be false or will affect the exiting installation.

+++ b/src/Plugin/Field/FieldFormatter/ImagefieldSlideshowFieldFormatter.php
@@ -197,6 +204,11 @@ class ImagefieldSlideshowFieldFormatter extends ImageFormatterBase implements Co
+    if ($image_prev_next) {
+      $summary[] .= t('Prev & Next :' . $image_prev_next);
+    }

shouldn't this be more verbose instead of 0 or 1 like 'Yes/No' ?

Also how about some theming/css for new buttons.

navneet0693’s picture

Agreed with @joshi.rohit100 ! It should FALSE I guess. Taking up CSS task.

navneet0693’s picture

Assigned: Unassigned » navneet0693
navneet0693’s picture

Assigned: navneet0693 » Unassigned
FileSize
5.64 KB
navneet0693’s picture

FileSize
670 KB

Resultant output.

joshi.rohit100’s picture

screenshot is looking good to me. Just a question, not with screenshot but what if we have only one image ? :)

navneet0693’s picture

Then prev-next may be of no use in such case, as it will repeat same image. We shouldn't hide them by default for only 1 value. We should leave choice to whether hide it or not.

joshi.rohit100’s picture

Yes thats true that button will be of no use for one image button showing buttons when they are of no use is kind of a bad UX. But then again, choice is of maintainer :)

heykarthikwithu’s picture

Assigned: Unassigned » heykarthikwithu
heykarthikwithu’s picture

Assigned: heykarthikwithu » Unassigned
FileSize
4.46 KB
1.5 KB

1. Yup guys we should have FALSE by default and we should not show prev and next if we have only one image, i have added a piece of check please have a check of this.
2. @navneet0693 was not able to apply this patch seems image is missing, please change in the latest patch now

root@karthik:/var/www/d83/modules/imagefield_slideshow# git apply -v prev_next_buttons-2781361-8.patch
Checking patch css/imagefield_slideshow.css...
Checking patch imagefield_slideshow.libraries.yml...
Checking patch imagefield_slideshow.module...
Checking patch img/next.png...
error: cannot apply binary patch to 'img/next.png' without full index line
error: img/next.png: patch does not apply
Checking patch img/previous.png...
error: cannot apply binary patch to 'img/previous.png' without full index line
error: img/previous.png: patch does not apply
Checking patch js/imagefield_slideshow.js...
Checking patch src/Plugin/Field/FieldFormatter/ImagefieldSlideshowFieldFormatter.php...
Checking patch templates/imagefield-slideshow.html.twig...

heykarthikwithu’s picture

Status: Needs review » Reviewed & tested by the community
heykarthikwithu’s picture

Status: Reviewed & tested by the community » Fixed

@joshi.rohit100, i have committed with the changes mentioned and @navneet0693 you can create one more ticket if you need to work on styling part.
thank you guys..

Status: Fixed » Closed (fixed)

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