Slideshow Macro
Displays a set of images as a slideshow using SwiperJS. |
Type | XAR |
Category | Macro |
Developed by | slauriere |
Active Installs | 8 |
Rating | |
License | GNU Lesser General Public License 2.1 |
Table of contents
Description
The slideshow macro displays a set of images in a slideshow using SwiperJS, a feature rich and mobile ready slideshow library. It is an alternative to the following macros: Carousel, Gallery, XCarousel. It brings image lazy loading, zooming and touch sliding capabilities.
The macro supports two modes: default or pile. In default mode, a slideshow is created from the images defined in the macro content, while in pile mode, all slideshow images on the current page whose mode is set to pile are assembled into a common slideshow. Optional captions can be added next to each image reference, or within the body of each slideshow call in case of pile mode.
Usage
Default mode
gallica-btv1b10052637j-5.jpg Lorem ipsum
gallica-btv1b10052637j-12.jpg Dolor sit amor
gallica-btv1b10052637j-3.jpg Cectetur adipiscing elit
{{/slideshow}}
Pile mode
= Lorem ipsum =
Dolor sit amor
{{/slideshow}}
{{slideshow images="gallica-btv1b10052637j-4.jpg" mode="pile" width="300px"}}
= Cectetur adipiscing elit =
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
{{/slideshow}}
Parameters
Name | Description | Mandatory | Default |
---|---|---|---|
width | Slideshow initial width, e.g. "800px" | No | 600px |
height | Slideshow initial height, e.g. "400px" | No | 300px |
mode | Either empty or pile (see above | Empty |
Example
Click on the image below to view a small video illustrating the macro usage.
The images bundled with the macro are Chinese paintings from the 14th century available from Gallica in the public domain.
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.
You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:
- Log in the wiki with a user having Administration rights
- Go to the Administration page and select the Import category
- Follow the on-screen instructions to upload the downloaded XAR
- Click on the uploaded XAR and follow the instructions
- You'll also need to install all dependent Extensions that are not already installed in your wiki
Dependencies
Dependencies for this extension (org.xwiki.contrib:xwiki-macro-slideshow 1.2):
- org.webjars.npm:swiper 6.2.0