You can include an RSS Feed widget anywhere in the main content area of your
page by including an empty div element with the id wdn_rss_widget
and including the plugin initialization (which will include the "UNL In The News"
RSS news feed):
WDN.initializePlugin('rss_widget');
To get the default stylization of the plugin, you also need to give it the
style class wdn-rss-widget
.
Alternatively, you can load the RSS widget with your own RSS feed by providing a URL as the second parameter:
WDN.initializePlugin('rss_widget', 'http://newsroom.unl.edu/announce/cse?format=xml');
You can also customize a few things by providing a JavaScript object like this:
WDN.initializePlugin('rss_widget', { url:'http://newsroom.unl.edu/announce/cse?format=xml',
elementId: 'wdn_rss_widget',
pause: 8000,
limit: 10,
num_show: 3});
Where each attribute is as follows:
wdn_rss_widget
)
The widget has been updated to allow multiple RSS widget feeds in the same
page. You can achieve this by providing an array of JavaScript
configuration objects:
WDN.initializePlugin('rss_widget', [
{
url: 'http://ucommxsrv1.unl.edu/rssfeeds/unlinthenewsrss.xml',
elementId : 'wdn_rss_widget',
pause: 5000,
limit: 8,
num_show: 4
},
{
url: 'http://newsroom.unl.edu/announce/cse/?format=rss',
elementId : 'wdn_rss_widget_cse',
pause: 10000,
limit: 10,
num_show: 2
}]);
Note that if you use multiple RSS feed widgets, you should provide distinct
elementId
s for each one. Moreover, each div should have the style
class, wdn-rss-widget
added to it to receive the same styling.
You can stylize your rss widget(s) further by adding zenbox style classes:
<div id="wdn_rss_widget" class="wdn-rss-widget zenbox primary"></div>
Possible options for the subclasses: bright, cool, energetic, neutral, primary, soothing (see the zenbox documentation for the colors these themes correspond to).