Integrating with a Content Management System to use the web feed utility

To use the web feed utility, you can integrate with any Content Management System that generates web feeds.

If you are using IBM Web Content Manager, packaged with WebSphere Portal, follow this procedure to configure IBM Web Content Manager, to generate web feeds. Creating feeds from IBM Web Content Manager is a two-step process:
  1. Create a template for the feeds by creating and configuring a Menu Component.
  2. Create sample data for feeds to output.

In this procedure, you use an example intranet site that is preinstalled with WebSphere Portal. The feed is managed by an Atom Feed Menu Component that creates an Atom feed for the existing site area. The feed is linked in the List presentation template. The Atom Feed Menu Component requires two 'CDATA' Text Components control rich text in the feed. To display your content on different pages, use a page URL mapping that refers to the page where the content is shown. Typically, design elements are stored in design library, but in this procedure you use the standard library 'Intranet 6.1.0' provided with the WebSphere Portal.

You can adapt this procedure to add feeds to other IBM Web Content Manager managed sites.

Procedure

  1. Add an Atom feed to your existing website.
    1. Using Mozilla Firefox, open http://portal.ibm.com:10040/wps/portal/intranet.

      This intranet home page that contains the latest news, announcement, and events. You add an Atom feed to Announcements section. People can subscribe to this list and use their favorite feed reader to receive updates on any new announcements.

      The page name is Intranet. Notice in the URL (http://portal.ibm.com:10040/wps/portal/intranet) that a Virtual Portal mapping of intranet exists for the page.

    2. Log in first as an IBM Web Content Manager designer
    3. Expand Applications > Content > Web Content Management.
      For example:
      Screen capture of IBM Web Content Manager page
    4. Change the library from default Internet Web Content 6.1.0 to Intranet Web Content 6.1.0. Go to the Content to verify that you have an Intranet site with a Home – Announcements site area. Notice the Announcement List that controls the list view, and two announcement entries Employee Achievements and Company Milestones.
      For example:
      Screen capture of Announcements
    5. Go to the Home level; select Announcements; then, click Edit.
      Screen capture that shows home
    6. On the Announcements tab, Manage Elements
      Screen capture of Manage Elements
    7. In the Element type list, select Short Text. In the Name field, type PageURLMapping. In the Display title field, type Page URL Mapping. Click Add; then, click OK.
      Screen capture of Element Manager
    8. In the Page URL Mapping field, type intranet. This portal page is where the announcements are shown. Click Save and Close. You can repeat this step for other site areas, News, and Events.
      Screen capture of Page URL
  2. To add rich text to your feeds, put text into CDATA tags, <![Data[, and ]]>. Add the text in text components; then add the text components to the menu component.
    1. Create a text component, click New > Component > Text.
    2. Complete the fields:
      Name
      Type CData Start.
      Display title
      Type CData Start.
      Text Element
      Type <![CDATA[
      For example:
      Screen capture of Identification
    3. Add access to all users (including anonymous). Expand the Access section. In the Contributor User Defined list, select [all users].
      Screen capture of Access
    4. Click Save to save the text component.
    5. Click Save as to create another text component that is based on the one you created.
      Name this component CData End. In the Text Element field, type ]]>. For example:
      Screen capture of Identification
    6. Click Save and Close.
  3. Create a menu component.
    1. Click New > Component > Menu
      Screen capture of Component Menu
    2. In the Identification page, set the following options:
      Identification section
      Name
      Atom Feed Menu
      Display title
      Atom Feed Menu
      Description
      Menu that creates an Atom feed for an existing site area
      Menu element query
      Select:
      • Site Areas
      • Exclude current content from results
      Further options
      Select:
      • Current content
      • Merge selected site areas with included site areas
      For example:
      Screen capture of Identification
    3. Add the following code in the header.
      
      <?xml version="1.0" encoding="utf-8" standalone="yes"?>
      <feed xmlns="http://www.w3.org/2005/Atom" >
      <title><IDCmpnt context="current" type="content" field="title"/></title>
      <link href="<PathCmpnt type="base"/>
        <URLCmpnt context="current" type="content" mode="standalone"/>">
      </link>
      <updated><HistoryCmpnt context="current" type="content" field="lastmodifieddate" format="yyyy-dd-MM'T'hh:mm:ss'Z'"/></updated>
      <author>
        <name><IDCmpnt context="current" type="content" field="authors" format="cn"/></name>
      </author>
      <id>
        <PathCmpnt type="base"/><URLCmpnt context="current" type="content" mode="standalone"/>
      </id>
      <generator uri="your_Web_Content_Management_site">Web Content Management</generator>

      Where your_Web_Content_Management_site is the URI value for your IBM Web Content Manager site.

      Based on the current context, the default content for a site area, it creates this example code:
      
      <?xml version="1.0" encoding="utf-8" standalone="yes"?>
      <feed xmlns="http://www.w3.org/2005/Atom">
      <title>Announcements List</title>
      <link rel="self" 
       href="http://portal.ibm.com:10040/wps/myportal/intranet?WCM_GLOBAL_CONTEXT=
       /wps/wcm/myconnect/Intranet+Web+Content+6.1.0/IntranetSite/Home/Announcements/AnnouncementsList">
      </link>
      <updated>2008-06-24T12:24:57Z</updated>
      <author>
        <name>uid=xyzadmin,o=defaultWIMFileBasedRealm</name>
      </author>
      <id>http://portal.ibm.com:10040/wps/myportal/intranet?WCM_GLOBAL_CONTEXT=
        /wps/wcm/connect/Intranet+Web+Content+6.1.0/IntranetSite/Home/Announcements/AnnouncementsList
      </id>
      <generator uri="your_Web_Content_Management_site">Web Content Management</generator>
      Note: This code is separated across multiple lines for readability.

      Where your_Web_Content_Management_site is the URI value for your IBM Web Content Manager site.

    4. Enter the following code in Design for each menu search result:
      
      <entry>
        <title type="text"><IDCmpnt context="autoFill" type="content" field="title"/></title>
        <link rel="alternate" type="text/html" 
         href="<PathCmpnt type="base"/><URLCmpnt context="autoFill" type="content" mode="standalone"/>">
        </link>
        <id><IDCmpnt context="autoFill" type="content" field="id" format="id"/></id>
        <published><WorkflowCmpnt context="autoFill" type="content" field="publishdate" 
         format="yyyy-dd-MM'T'hh:mm:ss'Z'"/></published>
        <updated><HistoryCmpnt context="autoFill" type="content" field="lastmodifieddate" 
         format="yyyy-dd-MM'T'hh:mm:ss'Z'"/></updated>
        <summary><Element context="autoFill" type="content" key="Summary"/></summary>
        <content type="image/jpeg"  src='<PathCmpnt type="base"/><Element context="autoFill" 
         type="content" key="Image" format="url" htmlencode="true"/>'></content>
        <category term="<ProfileCmpnt context="autoFill" type="content" field="categories"/>" ></category>
        <author>
          <name>
            <IDCmpnt context="current" type="content" field="authors" format="cn"/>
          </name>
        </author>
      </entry>
    5. Enter the footer in the code to end the feed:</feed>
      For example:
      Screen capture of Results
    6. Click Save. Notice that an ID is added to the component tags.
      Screen capture of search results
      If this ID is not added, verify that the correct names were used for the components.
    7. Allow this menu to be read by all users (including anonymous users). Expand the Access section and add [all users] to User-Defined users.
      Screen capture of Access
  4. Test your Atom Feed Menu.
    1. Click Preview.
      Screen capture of Preview
    2. Select the Intranet Web Content 6.1.0 library. Expand, Intranet > Home > Announcements; then, select the Announcements List.
      Screen capture of Preview
  5. Creating sample data for feeds to output.
    1. Select an authoring template.
      Screen capture of selecting an authoring template

      Screen capture of new template
    2. Choose the option to create new content.
      Screen capture of new content
    3. Click Manage Elements and add the attribute type.
      Screen capture of Element Manager

      Element Manager screen capture
    4. Click OK.
    5. Select a URL for the image.
      Select an image
    6. Click Save.
    7. When prompted to pick a category, browse to one and pick a site.
      For example, maybe, announcements.