Design Libraries

Sharing Design Resources Across Sites

Liferay DXP 2026.Q3+ Release Feature (LPD-57283)

Add style books and page fragments to a design library, then connect the sites that use them. In Liferay DXP 2026.Q4+, add content page templates so connected sites can use them when creating new pages.

Adding Design Resources to a Design Library

Open the Global Menu (Global Menu) and click Applications → Design Libraries, then click the library.

Click Add Asset in the Design Assets heading to create a design resource. The menu displays these options, based on your permissions:

  • Page Templates: A submenu containing New Content Page Template and New Page Template Set
  • New Style Book
  • Fragments: A submenu containing New Basic Fragment, New Form Fragment, and New Fragment Set
Important

Before Liferay DXP 2026.Q4, click New wherever the steps say Add Asset, and skip the Fragments submenu.

The Add Asset menu lists Page Templates, New Style Book, and Fragments, with the Page Templates submenu open.

If the library is empty, you can also click New in the Design Assets section, which lists the same items without submenus. When style books are the only type you can add, a New Style Book button replaces the New menu.

In Liferay DXP 2026.Q4+, delete multiple design resources at once by selecting their checkboxes in the Design Assets table, clicking Delete in the toolbar, and confirming the deletion.

Adding a Style Book

  1. In the library, click Add Asset → New Style Book.

  2. In the Add Style Book dialog, set these fields:

    Create Style Book For: The theme the style book applies to. The list holds every theme that provides a frontend token definition, which on a default installation is CMS Theme and Classic Theme.

    Name: The style book’s name.

    A style book’s available tokens come from its theme’s frontend token definition, so the theme you choose determines which tokens you can set. If no theme provides a token definition, the dialog reports that no themes are available.

    Choose the theme the style book applies to, then name it.

  3. Click Save.

    Liferay DXP opens the new style book in the Style Book Editor.

  4. Set the style book’s token values, then click Publish.

    The editor saves your work as a draft as you go, and the Saved indicator refers to that draft. Connected sites use the style book’s values only after you publish it.

  5. Use the back control at the top of the editor to return to the library, where the list of design resources now includes the style book.

Once a site is connected, you can preview a library style book against that site’s pages from the editor. Each page appears with its site’s name.

Adding a Page Fragment

Every fragment belongs to a fragment set.

  1. In the library, click Add Asset → Fragments → New Basic Fragment or New Form Fragment.

    Choose New Basic Fragment for a fragment you can place anywhere on a page, or New Form Fragment for a form fragment, which you map to a field in a form. Both types are written in HTML, CSS, and JavaScript.

  2. In the Add Fragment dialog, enter a Fragment Name.

    When the library already holds fragment sets, select the Fragment Set to hold the fragment, or click Save In New Set and replace the default Fragment Set Name. When the library holds no sets yet, the dialog asks for the Fragment Set Name directly and creates the set along with the fragment.

  3. Click Save.

    Liferay DXP opens the new fragment in the Fragments Editor.

  4. Add the fragment’s HTML, CSS, and JavaScript, then click Publish.

    A new fragment starts as a draft holding an empty element, and connected sites can use it only after you publish it.

  5. Use the back control at the top of the editor to return to the library.

    The library’s list holds fragment sets rather than individual fragments, so open the set to reach the fragment again.

To add an empty set, click Add Asset → Fragments → New Fragment Set, then replace the default Name and add an optional Description.

To import fragments from a ZIP file, the library must already hold a fragment set. Click the set in the library’s list, then click Actions (Actions) → Import next to the set’s name. The ZIP file’s own fragment sets are recreated in the library, so the set you open is only the entry point.

The same menu offers Export, which downloads the set’s fragments as a ZIP file. Export becomes available once the set holds a published fragment.

A library cannot hold fragment compositions. See Fragment Composition and Import Limitations.

A library’s fragments are written and managed the same way as a site’s own, though you reach a fragment’s actions from the library’s resource list rather than the site’s Fragments application. See Managing Fragments for those actions and Using Fragments for how fragment code works.

You cannot delete a fragment that any site’s page uses, including a site that has since been disconnected from the library. The View Site Usages report lists connected sites only, so a page on a disconnected site blocks a delete without appearing there, and the error names page templates even when an ordinary page is the blocker.

Adding a Content Page Template

Liferay DXP 2026.Q4+

A design library stores content page templates in page template sets, and every template belongs to one. Site builders pick templates by set when they add pages, so group templates by purpose, such as Campaign Landing Pages. You must have permission to add page template sets to see the New Content Page Template and New Page Template Set options. See Design Library Roles for details.

  1. In the library, click Add Asset → Page Templates → New Content Page Template.

    In an empty library, you can also click New → New Content Page Template in the Design Assets section.

  2. In the Add Page Template dialog, enter a Page Template Name.

    Select an existing Page Template Set to contain the template, or click Save In New Set and name the new set. If the library doesn’t contain any sets, the dialog prompts for a Page Template Set Name (Untitled Set by default) and an optional Description.

    The Add Page Template dialog has Page Template Name, Page Template Set Name, and Description fields.

  3. Click Save.

    Liferay DXP creates the template as a draft and opens it in the page editor. A template created in a library starts with the Blank master page template.

  4. Add elements to the template as described in Adding Elements to Content Pages, then click Publish.

    Once published, connected sites can use the template to add pages. See Page Templates.

To create a set without a template, click Add Asset → Page Templates → New Page Template Set, enter a name, and click Save.

The Design Assets table lists page template sets rather than individual templates. Open a set to view its templates as cards. Click a template’s name on its card to reopen it in the page editor.

Unlike a site’s Page Templates application, a set’s page in the library has no sets panel and omits Masters, Page Templates, and Display Page Templates tabs.

Connecting Sites to a Design Library

  1. Open the library and click More Actions (More Actions) → Connected Sites.

    In Liferay DXP 2026.Q4+, you can also open this dialog from the library home page’s Connected Sites section. Click Manage Sites in the heading, or click Connect Sites if no sites are connected. You must have update permission on the library to see these controls.

  2. In the Site field, enter an active site’s name, then select it from the results.

  3. Click Connect.

    Liferay DXP confirms the site is connected to the library.

    The Connected Sites dialog lists each connected site with a Disconnect control.

Connecting a site makes the library’s design resources available to that site’s pages, but doesn’t automatically alter any page’s appearance. Select a library style book for each page individually. Afterwards, publishing a change to the library style book updates the page directly, without staging or per-site overrides.

To disconnect a site and remove its access, click Disconnect (Disconnect) next to the site in the Connected Sites dialog. Disconnecting takes effect without a confirmation and causes these changes:

  • Style Books: Pages using one of the library’s style books revert to the site’s default style book.
  • Fragments: Existing library fragments on the site’s pages continue rendering unchanged, because each fragment placed on a page stores its own copy of the HTML, CSS, and JavaScript. However, the fragments disappear from the site’s page editor, and you can no longer propagate library changes to the site.
  • Page Templates: In Liferay DXP 2026.Q4+, disconnecting a site also removes the library’s page template sets, preventing you from using them to add new pages.

Where a Library’s Design Resources Appear

Style Books

Only the library style books built for the page’s theme appear, so a style book created for CMS Theme is not offered for a page using Classic Theme.

A style book from a library carries a badge showing the library’s name, which distinguishes it from the site’s own style books.

You can select it in either place:

  • The Select Style Book dialog, opened from the Style Book field in a page’s Design settings under Basic Settings. Its table view adds a Design Library column naming each style book’s source.
  • The Page Design Options sidebar in the page editor.

See Choosing a Style Book for a Page for the page-level procedure.

If a library style book you expect is missing from the list, check that its theme matches the page’s theme.

Page Fragments

The library’s published fragments appear in the Components sidebar of the page editor, alongside the site’s own. A set that comes from a design library carries an icon whose tooltip names the library, which distinguishes it from the site’s own sets. A set whose fragments are all unpublished does not appear.

By default, publishing a change to a library fragment does not update the fragments already placed on pages. To see every connected site that uses a fragment and propagate the change to it, click Actions (Actions) → View Site Usages on the fragment. See Propagating Fragment Changes.

Page Templates

Liferay DXP 2026.Q4+

When you add a page to a connected site, the Select Template page lists the library’s page template sets alongside the site’s own under Page Template Sets. A library set appears only if it contains at least one published template you can view.

Identify a design library set by its library icon. Hover over the set to display the library’s name in a tooltip, or select the set to see a label with the library’s name above its templates.

See Adding a Page to a Site.

The Select Template page shows the library's name next to the selected page template set.

Fragment Composition and Import Limitations

A design library cannot hold fragment compositions. When you import a fragment ZIP file that contains compositions into a library, the import adds the file’s fragments and lists each composition among the items it couldn’t import, with no explanation. Save each composition in the site where you use it.

In a site, you cannot create a composition from a fragment whose design library is not connected to that site. When you click Save Composition, the Save Composition Not Allowed dialog reports that some fragment references are missing and advises reimporting the fragments, which doesn’t clear the error. Connect the library to the site instead, and then you can save the composition.

Importing a page or page template into a site skips fragment page elements whose design library is not connected to that site. A page template import lists each skipped fragment by its key. When the same skip happens as you add a page element to a page, the fragment is dropped without a message. Connect the library to the site before you import.