Using Your Own Feeds

You don't have to use public Atom feeds, you can create your own. The collection field provides you with a simple standards-based means of integrating data from other systems into your CUE publications. All you have to do is generate a correctly-formatted Atom feed in which:

  • The title element of each entry contains the label that you want to appear in the field.

  • Some other element of each feed contains the data item you want to store in the field.

You can make the drop-down displayed when the user starts typing more informative by including the following additional elements in your feed entries:

summary elements

If your entries contains summary elements, then their content will be displayed below entry titles in the collection field drop down.

"top" link elements

If you include link elements with the Vizrt proprietary relation http://www.vizrt.com/types/relation/top, in your entries, then content of the link elements' title attributes will be displayed before entry titles in the collection field drop down. Link elements with this relation appear in some of the feeds returned by the Content Store web service. In section feeds, for example, the "top" link references the publication and in tag feeds it references the tag collection).

Here, for example, is a very simple feed:

<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <author>
    <name>my-site.com</name>
  </author>
  <id>http://my-host/my/first/feed</id>
  <link rel="self" href="http://my-host/my-first-atom-feed" type="application/atom+xml"/>
  <updated>2012-07-26T12:34:25.323Z</updated>
  <title type="text">My first feed</title>
  <entry>
    <id>http://my-host/my/first/entry</id>
    <title type="text">One</title>
    <content type="text">1</content>
    <summary type="text">The first</summary>
    <updated>2012-07-26T12:34:25.323Z</updated>
  </entry>
  <entry>
    <id>http://my-host/my/second/entry</id>
    <title type="text">Two</title>
    <content type="text">2</content>
    <summary type="text">The second</summary>
    <updated>2012-07-26T12:34:25.323Z</updated>
  </entry>
  <entry>
    <id>http://my-host/my/third/entry</id>
    <title type="text">Three</title>
    <content type="text">3</content>
    <summary type="text">The Third</summary>
    <updated>2012-07-26T12:34:25.323Z</updated>
  </entry>
</feed>

If this is referenced by the following collection field definition:

<field name="feedTest" 
  type="collection" 
  src="http://my-host/my-first-atom-feed" 
  select="content"
  mime-type="text/plain">
  <ui:label>My first feed</ui:label>
</field>

then CUE users will be able to choose between the values "One", "Two" and "Three" when filling in the field. Since the entries contain summary elements, each option displayed in the collection field drop-down will consist of two lines ("One" and "The first", for example).

Selecting "One" will cause the value 1 to be stored in the field.

CUE includes a special feature that allows you to include the name of the current publication in the feed URL associated with a collection field. This means that the service providing feeds to the collection field can send different feed content for different publications. For more information about this, see here.