Managing Fragments

Liferay DXP provides tools for managing fragments in the Liferay UI. With out-of-the-box tools, you can edit fragment code, export/import fragment sets between sites, and more.

Tip

To share fragments and sets between sites, add them to the Global site or use the export/import actions.

You can use the Export/Import actions within the fragment sets and individual page fragments if you have a ZIP file. Alternatively, if you have a LAR file, you can use the Export/Import options in the Options menu located at the Applications Bar.

Managing Fragment Sets

  1. Open the Site Menu (Site Menu) and go to DesignFragments.

  2. Select the desired fragment set.

  3. Click Actions (Actions) for the fragment set you want and select an action:

    Click the fragment set's Actions button to access management options.

    Edit: Change the name or description for the fragment set.

    Export: Download the fragment set as a .zip file. This file includes the set’s .json, fragment code, and resources.

    Import: Upload fragments and resources to a set as a .zip file. If an imported fragment has invalid rules, it is saved as a draft. This import process works similarly to the page template import process.

    Delete: Remove the current fragment set and all its contents.

Tip

To export multiple sets, click Actions (Actions) for the fragment set you want to export and select Export. Then, check the sets you want to export and click Export. Each set is downloaded as a separate .zip file.

Important

To export fragments in Liferay PaaS, use the appropriate JVM settings.

Managing Individual Page Fragments

  1. Open the Site Menu (Site Menu) and go to DesignFragments.

  2. Select the desired fragment set.

  3. Click Actions (Actions) for the fragment you want and select an action:

    Click the fragment's Actions button to access fragment management options.

    Edit: Modify the fragment’s code or configuration.

    Change Thumbnail: Change the fragment’s thumbnail image.

    Remove Thumbnail: Remove the fragment’s thumbnail image and use the default fragment type icon.

    Rename: Change the fragment’s name.

    Mark or Unmark as Cacheable: Mark or unmark the fragment as cacheable. When a fragment is cached, it improves the performance of its pages.

    View Usages: View the pages where the fragment is used. You can see the page’s name, type, version, and the time since the page’s last propagation. You can also select a page and propagate it.

    Export: Download the fragment as a .zip file.

    Make a Copy: Duplicate the fragment. Duplicated fragments share the same name with (Copy) appended to the end.

    Move: Move the fragment to a different fragment set.

    Delete: Remove the fragment.

    Important

    Users cannot edit or copy saved fragment compositions.

Copying Fragments

For Liferay DXP 7.2 SP1+ and Liferay Portal 7.2 GA2+

  1. Open the Site Menu (Site Menu) and go to DesignFragments.

  2. Select the desired fragment set.

  3. Click Actions (Actions) for the fragment you want and select Copy To.

    Click the fragment's Actions button and select Copy To.

  4. Select the set where you want to copy the fragment.

Tip

Users cannot edit default fragments directly. However, you can copy default fragments into a custom set and edit them there.

Capabilities

Product

Contact Us

Connect

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