Using Page Fragments

Page Fragments are extensible, reusable, drag-and-drop elements that are the primary building blocks for Content Pages. Each Fragment is built using CSS, HTML, and JavaScript. Together, Fragments define your page’s design and provide functionality along with widgets. You can create your own Fragment or use a number of Fragments that are available out-of-the-box.

You can quickly build a page with Fragments.

You may, however, require custom fragments. You can create your own Page Fragments using the built-in Page Fragment editor or locally from your desktop with the Fragments Toolkit. For a deeper dive into creating a custom Page Fragment, see Developing Page Fragments.

You can embed Liferay widgets and add fields containing text and images into page fragments. End users can add content to these page elements during the final Content Page publication process.

You can provide your own content in Fragments.

Page Fragments are organized into Collections. Collections group related Fragments together so you can manage them easily. Fragments are accessible through these Collections when building a Content Page. You can include resources in Page Fragment Collections and reference them from your Page Fragment’s code without worrying about their availability. This is helpful when moving Page Fragments. See Including Default Resources in Page Fragments for more information.

Collections provide an easy way to organize, manage, and share Fragments.