21 December, 2018 seen 10,823Today working on a customer's Drupal project, I found a kind of strange need - to display for authenticated users their flagged content in a drop-down menu - kinda Facebook, LinkedIn behavior, when you click on gear icon and magic happens - you see your latest messages, invitations, and e.t.c. So I must admit - at the start I didn't have an idea - how…
Recently, I faced a challenge while trying to display image galleries on a Drupal-powered website.
While there are a few modules that you can use to build your gallery view, such as the Views Slideshow Gallery module, I recently discovered some Drupal-powered sites using the Flex Slider library.
Excited by this new discovery, I tried to create a gallery with thumbnails, but unfortunately, it didn't work out as expected. However, I eventually found a solution on how to configure Flex Slider to work on Drupal.
Here are the steps required:
- Download the Flex Slider module, extract it to sites/all/modules
- Enable the Flex Slider and Flex Slider Views Display
- Download the FlexSlider library from https://github.com/woothemes/FlexSlider/tree/version/2.2
- Unzip the file and rename the folder to "flexslider" (pay attention to the case of the letters)
- Put the folder in a libraries directory - Ex: sites/all/libraries
- Ensure you have a valid path for all required files: jquery.flexslider-min.js, flexslider.css, and jquery.flexslider.js
- Go to admin/config/media/flexslider and create two new types, one for the gallery slider and another for the thumbnail slider.
- Create a new view, Gallery (block), to display the gallery slider. Set the format to Flexslider | Settings Option Set - Gallery and add the Images field.
- Create another block on the same view, call it Thumbnails. Set the format to Flexslider | Settings Option Set - Thumbnail and add the Images field.
- Make sure to remove the checkbox under Multiple Field Settings for the Images field.
- Place both blocks under the content region or any other preferred region.
- Go back to Flex Slider options, open the Gallery type, and under the Advanced Options tab, find the Sync field and enter "#flexslider-2." This will make both views work together.
- Edit the Thumbnail type and make any desired adjustments. Make sure to turn off the pager under Navigation and Controls for the thumbnail type.
With these steps, you should now be able to successfully display image galleries on your Drupal-powered site using Flex Slider.
Hire Reinis Fischer today and experience the difference that a top Drupal specialist can make for your website development project!