Managing Fragments

Managing Fragments

Liferay DXP provides tools for managing fragments in the Liferay UI. With out-of-the-box tools, you can quickly 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.

Managing Fragment Sets

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

  2. Select the desired fragment set.

  3. Click the set’s Actions button (Actions).

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

  4. Select an action:

    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. During import, check Overwrite Existing Files to overwrite existing fragments with the same fragment name. If an imported fragment has invalid rules, it is saved as a draft.

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

tip

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

Managing Individual Page Fragments

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

  2. Select the desired fragment set.

  3. Click the fragment’s Actions button (Actions).

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

  4. Select an action:

    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.

    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 the fragment’s Actions button (Actions) 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.