Ektron CMS400.Net Reference

>>Working with Ektron CSM400.NET Server Controls > RssAggregator Server Control

RssAggregator Server Control

An RSS Aggregator or reader takes an RSS feed and displays the information in a readable format. The RssAggregator server control lets you do the same by processing and displaying an RSS feed from any Web site. This allows you to create an information Web page for news, stories, images, lists of music, or for whatever purpose someone creates an RSS feed.

You can create a multi-level information Web page by using multiple RssAggregator server controls on the same page. For example, you could create a world news Web page by adding RSS feeds from the NY Times, The BBC, and AFP (Agence France-Presse).

The process of adding an RSS Aggregator to your Web site is simple.

1. Choose a Web form where the RSS Aggregator will reside

2. Drag and drop the RssAggregator server control on that Web form

3. Set the URL property to point at the RSS feed. For example, http://msdn.example.com/rss.xml

4. Save the Web form

When a visitor to your site views the Web form in a browser, he sees the RSS feed displayed properly. When he refreshes the Web page, any information that the RSS feed provider has updated is now reflected. See Also: Using the RssAggregator Server Control

By creating a custom XSLT, you can change the way an RSS feed is viewed by your site visitors.

RSSAggregator Server Control Properties

The RSSAggregator server control properties are described in this table.

Note: The following table only lists Ektron-specific properties. It does not describe native .NET properties such as font, height, width and border style. For documentation of these properties, see Visual Studio help.

Property

Value

Data Type

Authenticated

Indicates if you are logged in to the CMS Explorer and can use it to browse to Content, Collections, etc. Using CMS Explorer to Browse Your Ektron CMS400.NET Site

String

DisplayXslt

Determines how the information on the page is displayed

None-databind only

ecmNavigation - lists the title of every RSS feed item

Using the Collection Server Control

ecmTeaser - lists a title and a description of every RSS feed item

Using the Collection Server Control

Path to Custom Xslt - Enter the path to an Xslt that determines the display of the page

Warning! If you specify an external file, it is strongly recommended that you do not store this file in your site's Workarea folder. If you store this file in the Workarea folder, the file will be lost when you upgrade.

String

 

DoInitFill

By default, Fill occurs during the Page_Init event. Set to false if you want to postpone the fill-action until later. In this case, FIll is automatically called during the Page Render event.

You might do this if you need to set or change a property on the control in codebehind and have it render with your changes shown.

Boolean

Hide

Used to hide an RSS Aggregator server control in design time and run time.

True = Hide Metadata server control

False = Show Metadata server control

boolean

Language

Set a language for viewing the RssAggregator. This property shows results in design-time (in Visual Studio) and at run-time (in a browser).

Integer

LinkTarget

Defines the way a link acts when a link is clicked.

_blank - This target causes the link to always be loaded in a new blank window. This window is not named.

_self - This target causes the link to always load in the same window the anchor was clicked in. This is useful for overriding a globally assigned base target.

_parent - This target makes the link load in the immediate frameset parent of the document. This defaults to acting like “_self” if the document has no parent.

_top - This target makes the link load in the full body of the window. This defaults to acting like “_self” if the document is already at the top. It is useful for breaking out of an arbitrarily deep frame nesting.

ItemLinkTarget

MaxResults

The Maximum number of items from an RSS feed that are returned (0=unlimited).

Integer

SuppressWrapperTags

Suppresses the output of the span/div tags around the control. The default is False.

True - Suppress wrap tags.

False - Allow wrap tags.

Boolean

URL

The RSS feed path for the server control.

For example:
http://msdn.example.com/rss.xml

String

WrapTag

Allows a developer to specify a server control’s tag.

The default is Span.

Span - The <span> tag is used to designate an inline portion of an HTML document as a span element.

Div - The <div> tag is used when you want to apply attributes to a block of code.

Custom - Allows you to use a custom tag.

String

Using the RssAggregator Server Control

These steps show how to use the RssAggregator server control.

1. Drag an RssAggregator server control into a template.

2. Set the URL property with the path of the RSS feed you want to display. This example use the following RSS feed:

http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wpa/MRSS/topsongs/limit=10/rss.xml

This feed displays the top 10 songs according to the iTunes Music Store.

Note: In addition to the URL property, other Ektron properties are available to customize this server control. For more information on these properties, see RSSAggregator Server Control Properties

3. Build the Web form.

4. Browse to the Web page in your browser.

5. The page appears with an RSS list of information.

Retrieving the XML Structure of an RssAggregator Control

Retrieving the XML structure of XML content allows for greater control over developing XSLs. The following is an example of how to retrieve the XML structure:

1. Open a new Web form.

2. Drag and drop a RssAggregator server control onto it.

3. Set the URL property.

4. Drag and drop a Textbox on the Web form.

5. Set the TextMode property to MultiLine.

Note: It is also recommended that you set the width of the text box to at least 400px.

6. On the code behind page, add the following line.

Textbox1.Text = RssAggregator1.XmlDoc.InnerXml

7. Build the project.

8. View the Web form in a browser.

The XML structure of the RssAggregator Menu appears in the textbox.

For an additional example, see the RssAggregator XML page on the CMS400Developer samples page. It is located at:

In a browser:

http://<site root>/CMS400Developer/Developer/RSS/RssAggregatorXML.aspx

In the source code:

<site root>/CMS400Developer/Developer/RSS/RssAggregatorXML.aspx and RssAggregatorXML.aspx.vb


Visit the Ektron Dev Center at http://dev.ektron.com 1-866 - 4 - EKTRON

Ektron CMS400.NET Reference Version 8.02 SP1 Rev 1

Ektron Documentation,© 2011 Ektron, Inc.