BASICS

ADMINISTRATION

DEVELOPMENT

SUPER ADMIN

  LAST UPDATED
4/8/2014

RSS TCF Reference

This section contains information regarding the XML templates used in RSS feeds. These are XML files in a feeds directory inside of the OMNI-INF directory on the staging server and are inaccessible through OU Campus system. For appliance installations, they are included with the initial install. These should not be modified as they are currently the only supported feed schemas. The templates are provided for example's sake, and in the rare case that there is no RSS template to select in the drop-down field when an administrator is setting up an RSS feed. If this is the case, also support can be contacted:

Contact Support

Sample XML for the Generic RSS Template (/generic-2_0.xml)

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>{{title}}</title>
<link>{{link}}</link>
<description>{{description}}</description>
<language>en-us</language>
<lastBuildDate>{{lastBuildDate}}</lastBuildDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>OmniUpdate (OU Publish)</generator>
{{items}}
</channel>
</rss>

Sample XML for the Generic MRSS Template (/generic-mrss-2_0.xml)

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>{{title}}</title>
<link>{{link}}</link>
<description>{{description}}</description>
<language>en-us</language>
<lastBuildDate>{{lastBuildDate}}</lastBuildDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>OmniUpdate (OU Publish)</generator>
{{items}}
</channel>
</rss>

 

Next Page

 

Template Control File (TCF) Implementation

RSS feeds can be managed using OU Templates. Template control files (TCF) allow website administrators to generate custom feed creation forms for their users. TCFs even have the added advantage of creating a new page and RSS item in a single step. Variables can be used on page creation to pass the information to the RSS item using a news template. Users simply create a new page by choosing the RSS template, choosing the appropriate RSS feed, and the item is assigned to the page.

A TCF can use various techniques to parse feeds and display the feed items on the published page. For example, the Gallena University Demo Site uses server-side scripting. The “What's New Live Script” takes the RSS feed, parses the feed items, and displays them on the published page. In this case, the feed URL is hard-coded into the script. Another methodology for implementation is creating a script and including it in an asset that can be dropped in as navigation element. In this case, the URL could be edited via the asset.

This section provides supplemental material on implementing Media RSS in a TCF. For more information on Template Control Files, see TCF documentation.

TCF Variables

TCF <variable> fields can be accessed from within <template> attributes by using curly-bracket notation. For example, to set the RSS title to the value of the variable named “title”, the following RSS-title attribute statement might be used. Here is an example of an RSS-title <template> attribute, calling a TCF variable using curly-bracket notation:

RSS-title="Gallena University - {title}" 

RSS-Media Template Attribute

Media RSS can be seamlessly implemented in a template control file using the template rss-media attribute. All five of the following RSS-media fields must be implemented, in the following order:

  1. Title
  2. File URL
  3. Description
  4. Thumbnail
  5. Keywords

A special notation is used to separate each of these fields in the rss-media attribute. Media items are separated by double-bar (||), and media fields are separated by double caret (^^). Using this notation, an unlimited number of Media RSS items can be attached to an RSS item. The values inside the curly brackets are TCF variable names. Here is an example of the rss-title <template> attribute, calling a TCF variable using curly-bracket notation:

rss-media="{mtitle1}^^{murl1}^^{mdesc1}^^{mthumbnail1}^^{mkeywords1}||{mtitle2}^^{murl2}^^{mdesc2}^^{mthumbnail2}^^{mkeywords2}||{mtitle3}^^{murl3}^^{mdesc3}^^{mthumbnail3}^^{mkeywords3}"

 

Previous PageNext Page

 

Media RSS XML

This section describes the XML implementation of Media RSS, including the Media namespace and XML tagging structure.

Media Namespace

Media RSS implements the Yahoo Media RSS (MRSS) specification. Yahoo Media RSS uses the “media” namespace; this namespace must be declared in the RSS XML file before using Media RSS. Declaring this namespace can be accomplished by adding a root-level RSS tag. For example, an example of a media RSS namespace declaration is as follows:

<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">

OU Campus builds the RSS XML file using the feed templates supplied in the OMNI-INF folder on the staging server. This folder is not accessible from within the OU file manager. An FTP connection to the staging server is required to access these files. RSS templates typically reside in the /OMNI-INF/feeds directory.

XML Tagging Structure

RSS items can have an unlimited number of media content items. Each media content item is specified by a single <media:content> tag, which encapsulates the information about that item.

A URL to the media file is specified in the <media:content> url attribute.

The <media:content> tag has four children:

  • <media:title>
  • <media:description>
  • <media:thumbnail>
  • <media:keywords>

An example Media RSS item is shown below:

<media:content url="http://gallenauniversity.com/img/computer.jpg">
<media:title>New Library Computers</media:title>
<media:description>Gallena University's library welcomes new computer equipment this semester, just in time for the beginning of the new school year.</media:description>
<media:thumbnail url="http://gallenauniversity.com/img/computer_icon.jpg">
</media:thumbnail>
<media:keywords>computers, education, library</media:keywords>
</media:content>

Awareness of this XML tagging structure is useful for designing a script to display the feed content on a webpage. These RSS reader scripts may be written in a variety of web languages, including the following: PHP, ASP, JSP, and XSL.

The following code block, shown below, demonstrates a complete RSS XML file. Observe the location of the RSS namespace declaration and Media RSS Item:

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet title="XSL_formatting" type="text/xsl" href="/_resources/rss/news.xsl"?>
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>Example Media RSS</title>
<link>http://www.gallenauniversity.com/</link>
<description>This is an example Media RSS file.</description>
<language>en-us</language>
<lastBuildDate>Wed, 9 Sep 2009 09:49:22 -0700</lastBuildDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>OmniUpdate (OU Publish)</generator>
<item>
<title>Gallena University Celebrates 50th Anniversary</title>
<link>http://www.gallenauniversity.com/about/index.html</link>
<description>"The 50th anniversary celebration was excellent," explains college president Dan Smith."Our university has aged well." Gallena University services 15,000 students in a diverse variety of majors.</description>
<author>Andrew Huard <ahuard@omniupdate.com></author>
<pubDate>Tue, 8 Sep 2009 10:02:47 -0700</pubDate>
<media:content url="http://www.gallenauniversity.com/50th.mov">
<media:title>50th Anniversary Celebration</media:title>
<media:description>Gallena University celebrates its 50th Anniversary</media:description>
<media:thumbnail url="http://www.gallenauniversity.com/50th.jpg">
</media:thumbnail>
<media:keywords>anniversary, university, celebration</media:keywords>
</media:content>
</item>
</channel>
</rss> 

Previous Page

 


Was this page helpful?

Additional Comments:


(Include your email address if you would like a reply)

Procede to http://support.omniupdate.com/