Using a Widget Template Example
Widget Templates are great tools for customizing how widgets look and feel on your site.
This example shows changing the default configuration of the Media Gallery widget to use a Carousel widget template.
The Media Gallery widget is deprecated as of Liferay 2024.Q4+ and is scheduled for removal in a future release.
Configuring the Media Gallery Widget
If you don’t already have images in your Documents and Media, add some images to Documents and Media.
-
Go to Content and Data, click on Documents and Media → Add () to select files to upload.
Now, add the Media Gallery widget to a page.
-
Open the Site Menu () and go to Site Builder → Pages.
-
Start editing a page or create one.
-
In the Fragments and Widgets sidebar, look for the Media Gallery widget. Drag and drop it into the page.
-
Navigate to the widget menu () → Configuration → Display Template. Change the display template to Carousel.
Publish the page. The widget now uses a carousel display template.