An Interest In:
Web News this Week
- April 27, 2024
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
Creating a simple slider in Drupal 8
Install and enable the slick views module:
composer require drupal/slick_views ; drush en slick_views -y ; drush en slick_ui -y
The Composer will find and install additional modules by itself: slick, slick ui.
Go to the Status Report page:
/admin/reports/status
Slick requires the installation of libraries.
In the terminal, go to the folder libraries, which is in the root of the site.
cd ~/user/site/libraries
If it does not exist, then create it.
mkdir ~/user/site/libraries
Go to each library page, click Clone or donwload and copy the path:
While in the libraries folder, clone the libraries:
git clone https://github.com/dinbror/blazy.git ; git clone https://github.com/kenwheeler/slick.git
Go to the Slick module settings page and make a duplicate of the template.
/admin/config/media/slick
Change the name and machine name and save it immediately. For a simple slider, the standard settings are enough.
Create a new view and change the format from Unformatted List to Slick Carousel.
Click the Vanilla Slick checkbox, change the Optionset main to the Slider you created earlier, and save it.
In the settings of the view specify what to output, how much and how:
I output articles, two pieces in the display mode announcement.
Save a view.
Result in the Bartik theme
That's all. If you need a carousel of several columns or even rows, you can change their number in the Optionset settings yourself.
Original Link: https://dev.to/vadimfilimonov/creating-a-simple-slider-in-drupal-8-ped
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To