Issue
- How can I configure an RSS feed for web content?
Environment
- Liferay DXP 7.2
- Liferay DXP 7.3
- Liferay DXP 7.4
Resolution
In order to configure an RSS feed for web content, you should perform the following:
- Enable RSS feeds by going to Global Menu > Control Panel > System Settings > Web Content > Administration, scroll down, and check the box for "Show Feeds"
- On your target site, create a widget page and add an Asset Publisher portlet to it
- Configure the display settings of the Asset Publisher to be the default "Asset Publisher for This Page" by checking the box "Set as the Default Asset Publisher for This Page" (under the "set and enable" option of the portlet's display settings)
- Under the Display Settings, enable "Subscription" by checking the box for it
- On the portlet configuration, enable the RSS subscription by toggling "Enable RSS Subscription" under "Subscriptions"
- If needed, create a Web Content Article and add the page as its display page on the right panel while creating the article
- On the "Feeds" tab, create an RSS feed and add the target page URL under "Target Page Friendly URL" and the asset publisher portlet's ID under "Target Widget ID"
- Check the RSS configuration by clicking on "Preview"
- Result:
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"> <title>testfeed1</title> <link rel="self" href="http://localhost:8080/testfeed/-/journal/rss/20121/44532"/> <subtitle/> <id>http://localhost:8080/testfeed/-/journal/rss/20121/44532</id> <updated>2022-10-25T09:37:09Z</updated> <dc:date>2022-10-25T09:37:09Z</dc:date> <entry> <title>testRSS</title> <link rel="alternate" href="http://localhost:8080/testfeed?p_p_id=c0UMVLmVgRJf&p_p_lifecycle=0&_c0UMVLmVgRJf_articleId=44520&_c0UMVLmVgRJf_groupId=20121"/> <author> <name>Test Test</name> </author> <id>http://localhost:8080/testfeed?p_p_id=c0UMVLmVgRJf&p_p_lifecycle=0&_c0UMVLmVgRJf_articleId=44520&_c0UMVLmVgRJf_groupId=20121</id> <updated>2022-10-25T08:59:45Z</updated> <published>2022-10-25T08:59:00Z</published> <summary type="html"/> <dc:creator>Test Test</dc:creator> <dc:date>2022-10-25T08:59:00Z</dc:date> </entry> </feed>