Setting Widget Scopes

By default, Liferay’s page widgets are scoped by site, meaning all widget instances in a site share the same data and display the same content. For example, adding the Message Boards widget to two pages within the same site creates two instances using the same data. However, adding the widget to two different sites results in two independent instances with different data.

You can also scope widget instances to individual pages, allowing each widget to have its own data.

Liferay provides three scope options for page widgets:

ScopeDescription
DefaultScopes widget data to the current site.
GlobalScopes widget data to the Global site, with content management restricted to the Global site.
PageScopes widget data to a specific page. Once created, this scope can be used across different widgets, even on different pages.

To configure a widget’s scope,

  1. Start editing the page where the widget has been deployed.

  2. Click Options (Widget Options icon) in the widget header → Configuration, then select the Scope tab.

    Note

    Before Liferay DXP 2025.Q1, the Configuration option appeared in the widget’s top-right corner.

  3. Use the drop-down menu to select a scope.

    This menu includes the current site (e.g., Liferay DXP. The current site refers to the default scope), the Global site, the current page, and any other page scopes available in the site.

    If you haven’t created a scope for the current page, its name is followed by (Create New) (e.g., Home (Create New)).

    In the Scope tab, use the drop-down menu to select a scope.

  4. Click Save.

After creating a new widget scope, a Scope Configuration button (Scope Configuration Button) appears under Content & Data in the Site Menu (Site Menu). You can use this to manage the default scope or available page scopes.

Use the Scope Configuration button under Content & Data to determine which scope to manage content for.

Note

You can only delete a scope by deleting its associated page.

Capabilities

Product

Contact Us

Connect

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