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
Note

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.

Warning

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.

Note

On Liferay 7.2 and below, collections are referred to as content sets.

  1. Create a new page or edit an existing one

  2. 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.

  3. Drag and drop the Asset Publisher widget into the editing area.

  4. Click Actions (Actions icon.) at the top-right corner of the Asset Publisher widget.

    Click Actions to access the Asset Publisher configuration options.

  5. Select Configuration to display the Configuration dialog.

    You can configure an Asset Publisher widget to use the Collection, Manual, or Dynamic methods of retrieving assets to display.

  6. Under Asset Selection, select the assets you want to show in your widget.

  7. Under Display Settings, configure how to display your content.

  8. Under Subscriptions, configure email subscriptions and RSS feed subscriptions.

  9. Once you select your assets and configure the widget, click Save.

Note

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.

  1. Under Select Collection, click Select.

  2. Select either the Collections or Collections Providers tab.

  3. Choose one of your existing collections or collection providers.

  4. Click Save.

Click Select and choose from your saved collections.

Note

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.

Define the options for the dynamic asset collection, including Source, Scope, Filter, and Ordering.

  1. In the Scope section, choose to display assets from an individual site or other sites.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

    Warning

    When 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.

  6. (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:

  1. In the Scope section, choose to display assets from an individual site or other sites.

  2. In the Asset Entries section, use the Select button to filter for specific types of assets.

Warning

You can only select approved or scheduled web content.

  1. For the type of asset you select, check the assets you want to include.

    Here is an example of filtering for basic web content and manually selecting items

  2. Click Add.

  3. (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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

With two experiences in place, you can show 3 different sets of content.

Create multiple experiences to showcase different content variations using the Asset Publisher widget.

Capabilities

Product

Contact Us

Connect

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