Propagating Fragment Changes

By default, changes made to a custom fragment’s code are not propagated to deployed instances of the fragment. Using fragment propagation, you can propagate changes to fragment instances in one of two ways:

Important

To avoid overwriting data, changes made to editable fields cannot be propagated to the fragment directly. However, you can force propagation by changing the fragment’s field ID. When propagated, the field’s content is no longer displayed, though you can retrieve its content from the database using the old field ID. To learn more, see Fragment Specific Tags and Attributes Reference in the developer documentation.

Manually Propagating Changes

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

  2. Navigate to the Fragment Set for the desired fragment.

  3. Click Actions (Actions Button) for the desired fragment and select View Usages.

    Click the fragment's Actions and select View Usages.

    Tip

    If the View Usages option is unavailable, the fragment is not in use.

  4. In the Usages and Propagation page, check the fragment instances you want to update to the latest version.

    In the table, you can review whether a page or template is using a Previous Version or the Latest Version.

    Select the fragment instances to update.

  5. Click Propagate (Propagate) to update the selected instances of the fragment.

Changes made to non-editable fields are propagated automatically to the selected fragment instances.

Automatically Propagating Changes

Warning

Automatic propagation can lead to unintended consequences in the production environment, such as typos or inaccurate content being published. Use automatic propagation only for testing or development purposes.

  1. Open the Global Menu (Global Menu), click the Control Panel tab, and go to ConfigurationSystem Settings.

  2. Under the Content and Data section, click Page Fragments.

  3. Check the Propagate Fragment Changes Automatically box.

    Check the Propagate Fragment Changes Automatically box.

  4. Click Save.

When enabled, changes made to a fragment’s non-editable fields are propagated automatically to all instances of the fragment.

Capabilities

Product

Contact Us

Connect

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