Issue
- Our team is attempting to set up an RSS feed for web content, but are running into one of two issues: either all URLs listed in the feed are identical (pointing to the site, instead of pointing to where an asset can be viewed), or the links are unique but the page is blank when navigating to it.
- How can I have unique URLs displayed in the feed that point to where the web content article is visible via a Web Content Display (WCD), without adding a customization modifying RSS feeds?
Environment
- DXP 7.0, 7.1, or 7.2
Resolution
- Without any customizations, there are two methods to accomplish this end goal.
Method 1: Creating individual pages
-
Navigate to a site's [Site_Administration] > Content > Web Content > ⠇ > Feeds page, then add a new feed ("Method1Feed," for this example) targeting the new site using its friendly URL, such as
/web/site1method1
, and “Basic Web Content” for the structure and template under "Web Content Constraints," then save the feed
Note: At this point, you can click click ⠇> Edit next to the feed's name (on ⠇ > Feeds), and you should see the feed's URL. Opening that in another tab, you van verify that the feed is active and shows information about web content assets on this site (with no information yet about its URL) - Navigate to [Site Navigation] > Public Pages > ⠇, then add public pages for each web content asset included (for example, "Method1Page1" and "Method1Page2")
-
On each page, add a Web Content Display portlet, then configure the portlet to display the asset to be viewed on that page. Repeat this step for all other assets.
When refreshing the feed, you will now see a unique URL within the metadata of each web content asset (for example, http://localhost:8080/web/site1method1/method1page1), pointing to the page where users can view this content.
Since Method 1 requires a new page to be used for each individual asset (if intending to include a unique URL), this method is best used on sites with lighter web content usage or sites with a higher percentage of static content.
Method 2: Using the Web Content Widget's ID
- Before creating the web content feed, create a page to be used for the URL structures (if it does not already exist, such as "RSSPage"), then add a Web Content Display portlet to that page
- From the WCD's Configuration > Sharing menu, copy the widget's ID; this will look something like:
JournalContentPortlet_INSTANCE_6IhcVWIVbEc8
-
Navigate to [Site_Administration] > Content > Web Content > ⠇ > Feeds, then add a new feed ("Method2Feed," for this example) targeting the friendly URL for the site with the RSSPage, such as
/web/site2method2
, “Basic Web Content” for the structure and template under "Web Content Constraints," and adding the copied widget ID into the "Target" field, then save the feed
Note: At this point, you can click click ⠇> Edit next to the feed's name (on ⠇ > Feeds), and you should see the feed's URL. Opening that in another tab, you van verify that the feed is active and shows information about web content assets on this site. URLs will be included with the portlet's, site's, and article's IDs, but navigating to them at this point in time will not show them in the WCD. - Once the unique URLs are completed, you will want to configure the desired number of web content displays on the
site2method2/RSSPage
to display the desired articles (or, display the articles via an asset publisher).
Alternately, you could use this "target" page to include a list of all the article’s titles with hyperlinks on this page -- either manually created or using an asset publisher (so that users can click on the desired asset's title to view the article after clicking on/navigating to the “localhost:8080/web/site2method2/RSSPage…[articleID]” link from the feed, similar to being directed to a sitemap, but one that is specific to assets on the site).
Additional Information
- Method 1 requires a bit more manual setup, but allows the URLs to be friendlier and for the page with the asset to be more customizable. Method 2 requires less setup, but the URLs are not as friendly and the assets will not necessarily be displayed on the page (as described above).
- Please note that RSS Feeds are deprecated as of 7.2, but the functionality has not been removed at the time of this article's publishing. As such, RSS feeds will need to be explicitly enabled using the the information in this this Configuring RSS Feeds documentation prior to the above steps.
- There is currently an open feature request to add the ability to include unique RSS links for web content assets using a Display Page Template (which would help to decrease the manual steps described above), which can be followed at LPS-113722