Slideshow Macro

Last modified by Admin on 2022/02/21 00:27

cogDisplays a set of images as a slideshow using SwiperJS.
TypeXAR
CategoryMacro
Developed by

slauriere

Active Installs8
Rating
1 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager

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.

The syntax of this macro is still experimental at this stage and is subject to changes. Comments are welcome in the XWiki Forum or on the macro issue tracker.

Usage

Default mode

{{slideshow width="800px" height="400px"}}
gallica-btv1b10052637j-5.jpg  Lorem ipsum
gallica-btv1b10052637j-12.jpg Dolor sit amor
gallica-btv1b10052637j-3.jpg Cectetur adipiscing elit
{{/slideshow}}

Pile mode

{{slideshow images="gallica-btv1b10052637j-6.jpg" mode="pile" width="300px"}}
= 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

NameDescriptionMandatoryDefault
width

Slideshow initial width, e.g. "800px"

No600px
height

Slideshow initial height, e.g. "400px"

No300px
modeEither empty or pile (see aboveEmpty
 

Example

Click on the image below to view a small video illustrating the macro usage.

slideshow.jpg

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:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. 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

Get Connected