Voting starts in March for the Drupal Association Board election.
I am installing Flex Slider on a new site and found the scattered documentation almost useless so I started this page. The README is copied in below.
There are several ways you can feed the slider. You can use views or an image field or manually add images. The slider can be in content or a block. I need a fixed manual list in a block and added a child page where I will describe what worked for me. Please add your different uses as child pages.
Flex Slider is currently available as version 1.0 rc3 or 2.0 alpha1. Which should I use? I need the slider working today so I should use 1.0 rc3 but 1.0 rc3 is stuck back at May 18, 2012. Ok, I will risk the 2.0 alpha version.
Download the Flex Slider module from https://drupal.org/project/flexslider. The module is an 8 MB download that expands out to 51 files using 9 MB on disk.
Flex Slider also requires Ctools. Download https://drupal.org/project/ctools. Ctools installs 478 files occupying 2 MB on disk. Lots of modules use parts of Ctools and you probably have it already installed.
Install Ctools. Ctools contains nine modules and you need only one switched on, the Chaos tools module. There is no configuration required for the Chaos tools module.
Install Libraries and follow the Libraries documentation for adding a library in the libraries directory. There is no configuration required for the Libraries module.
Install Flex Slider then configure Flex Slider. The configuration is the hard part where you have to read everything and, for your use, you might need additional modules. The various uses should be added in child pages.
Modules in the Flex Slider package
- FlexSlider 7.x-2.0-alpha1 Integrate the FlexSlider 2 library with Drupal. Requires: Libraries, Chaos tools, Image , File, Field, Field SQL storage. Required by: FlexSlider Fields, FlexSlider Views Style, FlexSlider Example.
- FlexSlider Example 7.x-2.0-alpha1 Sample implementation of FlexSlider
Requires: Context (missing), Features (missing), FlexSlider (disabled), Libraries (enabled), Chaos tools (enabled), Image (enabled), File (enabled), Field (enabled), Field SQL storage (enabled), FlexSlider Fields (disabled), FlexSlider Views Style (disabled), Views (missing), Menu (enabled), Strongarm (missing)
- FlexSlider Fields 7.x-2.0-alpha1 Adds a display mode in Fields for FlexSlider
Requires: FlexSlider (disabled), Libraries (enabled), Chaos tools (enabled), Image (enabled), File (enabled), Field (enabled), Field SQL storage (enabled)
Required by: FlexSlider Example (disabled)
- FlexSlider Views Style 7.x-2.0-alpha1 Adds a Views style plugin for FlexSlider
Requires: Views (missing), FlexSlider (disabled), Libraries (enabled), Chaos tools (enabled), Image (enabled), File (enabled), Field (enabled), Field SQL storage (enabled)
Required by: FlexSlider Example.
Flex Slider adds one permission, Administer the FlexSlider module.
The Flex Slider configuration is under Administration » Configuration » Media at /admin/config/media/flexslider.
The Advanced tab lets you switch on a debug mode.
The List tab lets you add or import
optionsets. I started a child page for optionsets. Someone experienced will have to add meaningful detail.
Optionsets are sets of options for sliders. Each slider uses one optionset. An optionset can be shared by multiple similar sliders. Select the Add link to see the optionset page and what can be set. Read https://drupal.org/node/2039349 for a detailed description.
Integrates the FlexSlider library into Drupal.
Allows you to use FlexSlider in a few different ways
- As a library to be used with any other theme or module by calling flexslider_add() (N.B. You may also use libraries_load('flexslider') however this is not recommended)
- Integrates with Fields (flexslider_fields)
- Adds a Views display mode (flexslider_views)
Library available at https://github.com/woothemes/FlexSlider
- Simple, semantic markup
- Supported in all major browsers
- Horizontal/vertical slide and fade animations
- Multiple slider support, Callback API, and more
- Hardware accelerated touch swipe support
- Custom navigation options
- Use any html elements in the slides
- Built for beginners and pros, alike
- Free to use under the MIT license
1. Download the FlexSlider library from https://github.com/woothemes/FlexSlider
2. Unzip the file and rename the folder to "flexslider" (pay attention to the case of the letters)
3. Put the folder in a libraries directory
- Ex: sites/all/libraries
5. Ensure you have a valid path similar to this one for all files
- Ex: sites/all/libraries/flexslider/jquery.flexslider-min.js
You can also use Drush Make to download the library automatically. Simply copy/paste the 'flexslider.make.example' to 'flexslider.make' or copy the contents of the make file into your own make file.
No matter how you want to use FlexSlider (with fields or views) you need to define "option sets" to tell FlexSlider how you want it to display. An option set defines all the settings for displaying the slider. Things like slide direction, speed, starting slide, etc... You can define as many option sets as you like and on top of that they're all exportable! Which means you can carry configuration of your Flex Slider instances from one site to the next or create features.
Go to admin/config/media/flexslider
From there you can edit the default option set and define new ones. These will be listed as options in the various forms where you setup FlexSlider to display. NOTE: under advanced options, you can set a namespace prefix for the optionset. This will allow you to build custom CSS for each optionset. Start by copying the flexslider_img.css from the assets subfolder to your theme. Build new custom CSS for each prefix in your optionsets.
Carousels can be created with Flexslider2 by setting an Item Width for images and a Margin Width in the optionset. Use the flexslider_thumbnail image style and set your item width to fit the desired number of images into the div space available. NOTE: the margin width setting should correspond IN PIXELS to the margin widths set by your img CSS in your theme. This will allow Flexslider to properly calculate the "total width" of the image+margins so that horizontal scrolling behaves properly.
Flex Slider Views allows you to build views which display their results in Flex Slider. Similarly to how you can output fields as an "HTML List" or "Table", you can now select "Flex Slider" as an option.
Create or edit a view and ensure it can load a content type which contain image fields. Set your display fields to include an image field. In the field settings, DO NOT SET THE FORMATTER TO FLEXSLIDER. This will attempt to put Flex Sliders inside other Flex Sliders and will just get messy. Ensure you don't include any wrapper markup, labels or container markup for the field value itself. Save your field.
Next, go to "Format" in the main Views windows. Click and select "Flex Slider", then select your option set. Save your view and you should see your results displayed in Flex Slider.
You can toggle the development version of the library in the administrative settings page. This will load the unminified version of the library. Uncheck this when moving to a production site to load the smaller minified version.
### Image Width/Height Attributes
If your images aren't resizing, ensure the width and height attributes are removed. The module will attempt to remove them automatically on any image matching the pattern
ul.slides > li > img
You can export your FlexSlider option presets using CTools exportables. So either using the Bulk Export module or Features.
- [Wiki Documentation for FlexSlider 2](https://github.com/woothemes/FlexSlider/wiki/FlexSlider-Properties)