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.

Note

The Media Gallery widget is deprecated as of Liferay 2024.Q4+ and is scheduled for removal in a future release.

If you don’t already have images in your Documents and Media, add some images to Documents and Media.

  1. Go to Content and Data, click on Documents and MediaAdd (Add) to select files to upload.

    Select the files to display in documents and media.

Now, add the Media Gallery widget to a page.

  1. Open the Site Menu (Site Menu) and go to Site Builder → Pages.

  2. Start editing a page or create one.

  3. In the Fragments and Widgets sidebar, look for the Media Gallery widget. Drag and drop it into the page.

  4. Navigate to the widget menu (Actions) → ConfigurationDisplay Template. Change the display template to Carousel.

    The Media Gallery configuration screen.

Publish the page. The widget now uses a carousel display template.

The Media Gallery configuration screen shows changing templates.

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy