Displaying Assets Using the Asset Publisher Widget
As you create web content, remember that pieces of content are assets like message board entries and blog posts. The most common type of asset is the web content. The Asset Publisher widget supports these asset types by default:
- Blogs Entry
- Bookmarks Entry
- Bookmarks Folder
- Calendar Event
- Basic Document
- Google Drive Shortcut
- Documents Folder
- Dynamic Data Lists Record
- Knowledge Base Article
- Message Boards Message
- Basic Web Content
- Web Content Folder
- Wiki Page
Starting with Liferay DXP 7.2, developers can use the Info Framework to display assets from Information Lists.
The easiest way to configure an Asset Publisher to display the desired assets is to use a collection that suits your needs. Whether your collection is assigned assets manually or dynamically, the Asset Publisher widget automatically loads assets in the order the collection defines. In Liferay DXP 7.4 U10+ or GA14, Asset Publishers use the collection configuration by default.
Asset Publisher can’t display instance-scoped objects.
Selecting Assets in the Asset Publisher Widget
You can configure the Asset Publisher widget to select assets dynamically based on specific criteria, or manually, specifying exactly what assets to display. You can also display assets from collections.
On Liferay 7.2 and below, collections are referred to as content sets.
-
Create a new page or edit an existing one
-
While editing the page, look at the Fragments and Widgets tab on the left of the page editor and search for the Asset Publisher widget.
-
Drag and drop the Asset Publisher widget into the editing area.
-
Click Actions (
) at the top-right corner of the Asset Publisher widget.
-
Select Configuration to display the Configuration dialog.
-
Under Asset Selection, select the assets you want to show in your widget.
-
Under Display Settings, configure how to display your content.
-
Under Subscriptions, configure email subscriptions and RSS feed subscriptions.
-
Once you select your assets and configure the widget, click Save.
While you can set permissions for asset publishers, you cannot directly control which roles see the Add icon. To achieve this level of permission, customization is required.
Asset Selection Options
The Asset Publisher widget uses one of these methods to select assets for display:
Collection
Choose from your previously saved collections or collection providers. To learn more about collections, see About Collections and Collection Pages.
-
Under Select Collection, click Select.
-
Select either the Collections or Collections Providers tab.
-
Choose one of your existing collections or collection providers.
-
Click Save.
Developers can use collection providers to create specific collections with more advanced criteria. To learn more, read the information about Creating an Information List Provider in the Info Framework developer documentation.
Dynamic
Include assets in the Asset Publisher widget automatically based on your choice of criteria.
-
In the Scope section, choose to display assets from an individual site or other sites.
-
In the Source section, use the Asset Type drop-down menu to select your assets. Select a specific asset type or Select More Than One to choose from different types.
With some options (e.g. Web Content Article and Document) selecting a subtype (e.g. Web Content Article Structures and Document Type) is required. You can choose any subtype or select more than one subtype.
-
In the Filter section, define the rules for the assets in your Asset Publisher widget. You can define rules based on categories, tags, or keywords.
You can choose filters for items such as Contain/Do Not Contain All or Any of the following Categories, Keywords, or Tags and, then specify the categories, keywords, or tags.
-
Before
Liferay DXP 2024.Q1+/Portal 7.4 GA112+
, include a Custom User Attribute if you have defined one.The assets appear only if they match the included custom user profile attributes.
The Custom User Attribute option within the Asset Publisher widget is deprecated as of
Liferay DXP 2024.Q1+/Portal 7.4 GA112+
. Instead, try Displaying Content Dynamically Using Experiences. -
In the Ordering section, choose the presentation order of assets in the Asset Publisher widget.
Select a primary and a secondary field to order the assets by. You can also choose to order the assets in ascending or descending order.
WarningWhen selecting web content articles as the asset type and ordering by a localized web content structure field, all assets’ field values should be localized when other languages are applied to the site. Only translated assets are ordered when another language is applied.
-
(Optional) Click Create a collection from this configuration, enter a title, and click Save to save the configuration as a new collection.
Manual
Set parameters and manually filter specific assets:
-
In the Scope section, choose to display assets from an individual site or other sites.
-
In the Asset Entries section, use the Select button to filter for specific types of assets.
You can only select approved or scheduled web content.
-
For the type of asset you select, check the assets you want to include.
-
Click Add.
-
(Optional) Click Create a collection from this configuration, enter a title, and click Save to save the configuration as a new collection.
Displaying Content Dynamically Using Experiences
Once the Asset Publisher widget is ready to display content, you can create personalized experiences for different groups of users by customizing the content displayed in the Asset Publisher widget for each group. See Content Page Personalization to learn more about personalizing experiences.
With the Asset Publisher widget and collections in place, create an experience to display content dynamically based on an audience.
-
Open the Select Experience modal by clicking Default next to the language flag on the top left of your page. Create a new experience or select an existing one.
If you have an experience in place, skip the next step.
-
Name the experience, select the target Audience, and click Save.
If there’s no audience in place, click New Segment to create one. Read Creating Segments to learn more.
After creating the experience, it appears in the Select Experience modal.
-
Arrange the experiences and prioritize the desired one by moving it upwards using the arrows. Activate the experience by moving it above the Default experience. Read Understanding How Experiences Work to learn more.
-
After selecting an experience, configure and edit the page, including the Asset Publisher widget and the content displayed in the widget. This version of the page appears when the selected experience is active.
Below, two experiences have been created: Content for HR Employees
and Content for IT Employees
. Each shows different categorized content to different audiences. You can also see the Default experience that shows all available content.
Create multiple experiences to showcase different content variations using the Asset Publisher widget.