Slick extras
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
Provides Slick carousel samples and extra utilities demonstrating various usages of Slick carousel. The provided samples are forward-compatible with next Slick versions.
With Media file and its supported sub-modules (Youtube, Vimeo, or Soundcloud), or Slick media, it is easy to have richer slideshow/carousel contents with a mix of text, image and video.
Slick Carousel module demos
This module contains sub-modules:
- Slick development
- Slick example
Requirements
- Blazy (>= 8.x-1.0-alpha3)
- Slick Views
- Slick Fields, included in Slick carousel
Samples included
- Block: 3d back, a very simple 3d carousel with CSS only,
- Block: main, to have basic overlay/caption over the main stage,
- Block: asnavfor, carousel with thumbnail navigation,
- Block: carousel, multiple visible slides at a time,
- Block: fullscreen, to have full screen slider,
- Block: grid, to build a Grid carousel, or multiple row carousel.
Quick steps
Assumed Slick Example, Image and Devel generate modules are already installed, If not, please install and enable them at "admin/modules".
Visit the following pages:
- admin/structure/types/add
Create a dummy content type, say "Slideshow", or use an existing one.
Hit "Save and add fields", landed to #2 page. - admin/structure/types/manage/slideshow/fields
Add two field types of image named exactly as below for now:
o Image (single value).
o Images (multiple values).
Later can be Media file, Field collection, etc. - admin/config/development/generate/content
Generate "Slideshow" contents. To have a working Grid sample, generate at least 13 - 24. - admin/structure/block
Place the Slick Example Views blocks, prefixed with "Slick X:", at any wide region at a particular testing page, and see your slicks there.
Enjoy!
To learn more about Slick, go to:
- admin/structure/views
Find "Slick Example", and hit "Edit" or "Clone", and make it yours. Only "Block: grid" is expecting "Image" from "Article". The rest expect field "Images".
Adjust, and change anything. - admin/structure/types/manage/slideshow/display
Find "Images" and add a formatter "Slick Carousel" under "Format".
Play with anything and see the changes at its full page.
Be sure to disable "Cache" option during work, otherwise no changes are visible.
Use the pattern with different field names and paths to any fieldable entity later for more complex needs.
Slow steps
The Slick Example is just providing basic samples of the Slick usage:
- Several optionsets prefixed with "X" available at "admin/config/media/slick".
Clone what is needed, and make them disabled, or uninstalled later. - Several Views blocks available at "admin/structure/views".
Clone it and make it yours, adjust anything accordingly. - Several slick image styles at "admin/config/media/image-styles".
Re-create own styles, and adjust the sample Views accordingly after cloning.
Requirements
Adjust content type to any fieldable entity: node, user, paragraphs, Media, FC, etc.
- field_image, as available on Article content type of Standard install.
- field_images, must be created before seeing this example useful immediately.
- node/3 containing field_images for D7. While D8 expect the latest node to have images.
See "admin/reports/fields" for the list of your fields.
Manage fields
To create the new field "Images":
- Go to: admin/structure/types
Choose any "Manage fields" of the expected content type, for easy test try Article where a single Image is installed by default. Basic page is fine too. Or do both. - Add new field: Images (without "field_" as Drupal prefixes it automatically)
- Select a field type: Image
- Save, and follow the next screen.
Be sure to choose "Unlimited" for the "Number of values".
You can also do the similar steps with any fieldable entity:
- admin/structure/field-collections
- admin/structure/paragraphs
- admin/config/people/accounts/fields
- etc.
All requirements may be adjusted to available instances, see below.
To have various slick displays, recommended to put both "field_image" and "field_images" at the same content type. This allows building nested slick or asNavFor at its very basic usage just as easily.
Later use the pattern to build more complex nested slick with
video/audio via Media file fields or SCALD atom reference when using with Field collection module.
Shortly, add, or adjust the fields manually to learn from this example.
Views collection page
Adjust the example references to images accordingly at the Views edit page.
- Go to: admin/structure/views
- Edit the Slick Example Views before usage, adjust possible broken settings:
admin/structure/views/view/slick_x/edit
For D7, the first block depends on node ID 3 which is expected to have "field_images": For D8, all blocks are expecting the latest node to have field "field_images".
admin/structure/views/view/slick_x/edit/block
If no such node ID, adjust the filter criteria to match the site node ID containing images.
If no "field_images", simply change the broken reference.
Slick grid aka Multiple rows carousel
Slick grid is expected to have at least 12 visible images per slide.
Be sure to have at least 13 visible images/ nodes with image, or so, to see a working Grid which results in at least 2 rows of grids per slide.
Change the numbers later once all is set, and get a grasp of it.
To create Slick grid, or multiple rows carousel, there are 3 options:
- One row grid managed by library:
Visit admin/config/media/slick,
Edit current optionset, and set
slidesToShow > 1, and Rows and slidesperRow = 1 - Multiple rows grid managed by library:
Visit admin/config/media/slick,
Edit current optionset, and set
slidesToShow = 1, Rows > 1 and slidesPerRow > 1 - Multiple rows grid managed by Module:
Visit admin/structure/views/view/slick_x/edit/block_grid from slick_example.
Be sure to install the Slick example sub-module first.
Requires skin "Grid", and set slidesToShow, Rows and slidesPerRow = 1.
The first 2 are supported by core library using pure JS approach.
The last is the Module feature using pure CSS Foundation block-grid.
The key is:
The total amount of Views results must be bigger than Visible slides, otherwise broken Grid.
Read more
See slick_example.module file for more exploration on available hooks.
Note
- If Skin main is left empty, no module CSS will be loaded. You are on your own. Unless your CSS is very advanced, recommended to choose a Skin as it contains several core fixes. Then do overrides using regular
hook_css_alter()
,stylesheets[]
directives, or the provided hooks to any of the module CSS. Skins are never assumed final, but starters, and they may not always meet your needs. - These modules were previously included in Slick 2.x till beta1, now contrib, see #2497079: Move some sub-modules into separate projects