common:rssFeed

This is a nice taglib which lets you give users RSS-feeds from your site. We use Rome backend to output the format you wish to use.

Parameters

Name Required Default Type Description
id false   Object/String The id of the variable to store the feed in.
feedType true   Object/String What kind of feed - rss_0.9, rss_0.91, rss_0.92, rss_0.93, rss_0.94, rss_1.0, rss_2.0, atom_0.3
title false   Object/String The title of the feed
link false   Object/String The url to the feed
description false "..." Object/String A description of the feed.
         


ID-result variable contains: A String-object containing the RSS-XML.


Examples

This example will return an rss-xml. OBS: The categories below are just fakes to show how you can add atom-categories.

<%@ taglib uri="infoglue-common" prefix="common" %>
<%@ taglib uri="infoglue-page" prefix="page" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

<page:deliveryContext id="dc" trimResponse="true"/>

<common:rssFeed id="rss" title="MyFeed" link="http://www.mycomp.com/rss" description="The best feed" feedType="atom_1.0">
<content:childContents id="news" propertyName="News folder" sortAttribute="publishDateTime" sortOrder="desc"/>
<c:forEach var="newsItem" items="${news}" varStatus="count">
<content:contentAttribute id="navigationTitle" contentId="${newsItem.id}" attributeName="${titleName}"/>
<content:contentAttribute id="leadIn" contentId="${newsItem.id}" attributeName="${descriptionName}"/>
<structure:pageUrl id="url" contentId="${newsItem.id}" propertyName="News detail page"/>
<common:rssFeedEntry title="${navigationTitle}" link="${url}" description="${leadIn}" publishedDate="${newsItem.publishDateTime}">
<common:rssFeedEntryCategory taxonomyUri="infoglue" name="Sports"/>
<common:rssFeedEntryCategory taxonomyUri="infoglue" name="News"/>
</common:rssFeedEntry>
</c:forEach>
</common:rssFeed>
<c:out value="${rss}" escapeXml="false"/>



comments powered by Disqus