Projet

Général

Profil

Paste
Télécharger (5,06 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / flexslider / README.txt @ a45e4bc1

1
About
2
=====
3
Integrates the FlexSlider library into Drupal.
4

    
5
Known Issues
6
------------
7

    
8
- IE10 requires an updated version of jQuery to work properly with FlexSlider. Please see http://drupal.org/project/jquery_update
9

    
10
Current Options
11
---------------
12
Allows you to use FlexSlider in a few different ways
13

    
14
- 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') or drupal_add_library('flexslider', 'flexslider'), but only if you want to control everything manually).
15
- Integrates with Fields (flexslider_fields)
16
- Adds a Views display mode (flexslider_views)
17

    
18
About FlexSlider
19
----------------
20

    
21
Library available at https://github.com/woothemes/FlexSlider
22

    
23
- Simple, semantic markup
24
- Supported in all major browsers
25
- Horizontal/vertical slide and fade animations
26
- Multiple slider support, Callback API, and more
27
- Hardware accelerated touch swipe support
28
- Custom navigation options
29
- Use any html elements in the slides
30
- Built for beginners and pros, alike
31
- Free to use under the MIT license
32

    
33
Installation
34
============
35

    
36
Dependencies
37
------------
38

    
39
- [Libraries API 2.x](http://drupal.org/project/libraries)
40
- [FlexSlider Library](https://github.com/woothemes/FlexSlider)
41

    
42
Tasks
43
-----
44

    
45
1. Download the FlexSlider library from https://github.com/woothemes/FlexSlider
46
2. Unzip the file and rename the folder to "flexslider" (pay attention to the case of the letters)
47
3. Put the folder in a libraries directory
48
    - Ex: sites/all/libraries
49
4. The following files are required (last file is required for javascript debugging)
50
    - jquery.flexslider-min.js
51
    - flexslider.css
52
    - jquery.flexslider.js
53
5. Ensure you have a valid path similar to this one for all files
54
    - Ex: sites/all/libraries/flexslider/jquery.flexslider-min.js
55

    
56
That's it!
57

    
58
Drush Make
59
----------
60

    
61
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.
62

    
63
Usage
64
======
65

    
66
Option Sets
67
-----------
68

    
69
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.
70

    
71
Go to admin/config/media/flexslider
72

    
73
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.
74

    
75
Carousels
76
---------
77

    
78
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.
79

    
80
Flexslider Views
81
----------------
82

    
83
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.
84

    
85
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.
86

    
87
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.
88

    
89
Debugging
90
---------
91

    
92
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.
93

    
94
### Image Width/Height Attributes
95

    
96
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 
97

    
98
    ul.slides > li > img
99
    
100

    
101

    
102
Export API
103
==========
104

    
105
You can export your FlexSlider option presets using CTools exportables. So either using the Bulk Export module or Features.
106

    
107
External Links
108
==============
109

    
110
- [Wiki Documentation for FlexSlider 2](https://github.com/woothemes/FlexSlider/wiki/FlexSlider-Properties)