Default Fragments Reference

Liferay provides many out-of-the-box fragments, so you can start building your solution immediately. To view available fragments, begin editing a content page or page template. While editing, open the Fragments and Widgets tab (Fragments and Widgets) in the editing sidebar menu.

Fragments are organized into the following sets:

Note

Available configuration options vary by fragment and fragment sub-element. See Configuring Fragments for more information.

Layout Elements

For Liferay 7.3+

Layout elements define drop zones for designing page and template layouts. By default, Liferay includes two layout elements: Container and Grid.

FragmentDescription
Container (previously Panel)Adds a configurable drop zone.
Grid (previously Row)Adds multiple drop zone modules. These modules can be configured and arranged vertically or horizontally.

Basic Components

These are simple design elements that add basic functionality to a page. Examples include buttons, headings, and tabs. With these components, you can build your page piece by piece. DXP includes the following basic components:

FragmentDescription
ButtonAdds a link element that can be a Link or an Action type. You can apply five button styles: Primary, Secondary, Link, Outline Primary, and Outline Secondary.
CardAdds image, rich text, and link elements arranged as a display card.
DateAdds a field that you can map to custom date fields.
Drop-down 7.4+Adds a simple text element and drop zone. You can drag-and-drop other fragments and widgets into the drop zone to create an advanced drop-down menu.
External Video 7.4+Embeds an external video in a page or template. Supported video sources include YouTube, Facebook, Twitch, Vimeo, and videos stored in Documents and Media.
HTMLAdds an editable HTML element. Double-clicking the element opens a modal window where you can edit its content using HTML syntax.
HeadingAdds a simple text element that can be configured to use H1-H6 heading levels.
ImageAdds a configurable image element. When configuring, determine whether to use the image’s original size, or adjust it to fit its context.
ParagraphAdds a rich text element. When editing, highlight the fragment’s text to access additional formatting options.
SeparatorAdds a horizontal line between page elements. You can configure its spacing and color.
SliderAdds multiple images with rich text overlay that are grouped into slides. Users can manually cycle through each slide.
SocialAdds image elements with Facebook, Twitter, and LinkedIn icons, which you can link to pages on each platform.
SpacerAdds a horizontal blank space between fragments on a page. You can configure its height.
TabsAdds multiple tabs with simple text elements and individual drop zones for adding widgets and other fragments.
Video URL (previously Video Fragment)Embeds a video from YouTube or Documents and Media in a page or template. You can set the video to autoplay, loop, mute, or hide controls. You can also hide video controls from end users.

Form Components

For Liferay 7.4 U45+/GA45+

Use form components fragments to build forms in content pages. These fragments only support custom objects. To enable and access them, you must have at least one published object. See Using Fragments to Build Forms for more information.

FragmentDescription
Form ContainerAdds a container for building forms in content pages. Once added, you must map the container to a custom object. The container automatically generates form fragments for each field in the object. You can add or remove fragments from the container and set a custom success message for form submissions. You can only place other form components in a mapped form container.
CAPTCHAAdds CAPTCHA confirmation to a form container. Once added, the form container requires human verification for submissions.
CheckboxAdds a checkbox to the form container that you can map to boolean fields.
DateAdds a field that you can map to custom date fields.
File UploadAdds a file upload button that you can map to attachment fields. The mapped attachment field determines how files are uploaded. By default, this fragment displays supported file extensions.
Multiselect ListAdds a field that you can map to multiselect picklists.
Numeric InputAdds a field that you can map to custom numeric fields (i.e., integer, long integer, decimal, and precision decimal). You can set a placeholder value and help text.
Rich Text InputAdds a field that you can map to rich text fields.
Select from ListAdds a drop-down menu that you can map to custom picklist and relationship fields. If the mapped field includes more than 10 options, the user can search in the drop-down menu for querying options.
Submit ButtonAdds a button for submitting the form entry. Every form container must include a submit button.
Text InputAdds a field that you can map to text fields (i.e., text, long text).
TextareaAdds a field that you can map to long text fields.
TagsAdds a field to add tags from the current site or global site to object entries.
CategoriesAdds a field to add categories from the current site or global site to object entries.

Content Display

For Liferay 7.3+

Use content display fragments to display site content individually or as part of a collection. You can also add page elements for rating or flagging page content. DXP includes the following content display fragments:

FragmentDescription
Collection DisplayDisplays manually and dynamically defined collections, as well as collections defined by a collection provider. You can configure whether the collection appears in a grid, or with a list template (i.e., bordered, bulleted, inline, numbered, and unstyled). See Displaying Collections for more information.
Content DisplayDisplays a single content item from documents and media, web content, blogs, or categories. Available configuration options depend on the selected content type.
Applied Filters (Available 7.4+)Adds an element for displaying and managing filters applied to a collection display.
Content FlagsAdds an element for flagging a content item.
Collection Filter (Available 7.4+)Adds an element for filtering a collection display using a vocabulary or category.
Content RatingsAdds an element for rating a content item.
!!! note
    Collection Filter fragments used in Collection Display fragments only work if mapped to object collection providers or blueprint collection providers.

Account

Liferay DXP 7.4 U72+/GA72+

Use the account selector fragment to switch easily between your accounts when browsing products and creating orders. See Using the Account Selector Fragment for more information.

Cart

Liferay DXP 7.4 U69+/GA69+

Use the mini cart fragment to obtain a detailed overview of your cart. You can use it to adjust the product quantity, remove items, start the checkout process, or easily search for and add products to your cart. See Using the Mini Cart Fragment for more information.

Featured content fragments are complex page elements composed of multiple components. To preview a fragment’s layout, switch to Card View (Card View) in the Fragments and Widgets panel. Liferay includes the following featured content fragments.

Note

For Liferay DXP/Portal 7.3, you can preview layouts by hovering over each fragment’s Information icon (Information).

Banners

Use banner fragments to add text and link elements to a content page for creating CTA (Call to Action) banners. DXP includes the following layouts.

Add text and link elements to a content page for creating call to action banners.

Features

Use the features fragment to add text, images, and link elements to a content page for promoting key features. Liferay provides the following layout.

Add text, image, and link elements to a content page for promoting key features

Highlights

Use the highlights fragment to add image, text, and link elements to a content page for highlighting. Liferay provides the following layouts.

Add image, text, and link elements to a content page for highlighting.

Footers

Liferay 7.3+

Use footer fragments to add a custom footer to master page templates. Each footer includes a navigation menu, sign-in link, image element, and copyright text. Liferay provides the following layouts for footer fragments:

Add a custom footer to master page templates for content page.

Liferay 7.3+

Use navigation bar fragments to add a custom header to master page templates. Each navigation bar includes a navigation menu, sign-in link, and image element for your logo. Liferay provides the following layouts for navigation bar fragments:

Add a custom header to master page templates for content page.

Liferay 7.4+

Using the menu display fragment, you can add menus to your content pages. Once deployed, you can select from any predefined navigation menu. To learn more about how to configure the menu display fragment for your site navigation, see Configuring the Menu Display Widget in Configuring Menu Displays.

You can also create a custom menu display fragment with specific markup and desired behavior by using the navigation menu selector configuration.

Capabilities

Product

Contact Us

Connect

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