tag:help-archives.hannonhill.com,2010-02-09:/discussions/velocity-formats/12403-rss-feed-displayCascade CMS: Discussion 2018-10-18T20:37:39Ztag:help-archives.hannonhill.com,2010-02-09:Comment/377008762015-08-19T20:22:37Z2015-08-19T20:22:37ZRss feed display<div><p>Hi Jim,</p>
<p>I think the problem is because the description content contains
a <code><p></code>, you are escaping the slash in the end
tag, and you are trying to put that within a
<code><p></code>.</p>
<p>I was able to successfully test the following Format which
doesn't use the Escape Tool for the description since it contains
HTML, but does use a <code>#protect</code> code section just to be
safe. When you have a moment, give this a try and let me know how
it works out:</p>
<pre>
<code>## grab all news items from RSS feed
##set ( $articles = $_XPathTool.selectNodes($contentRoot,"/system-xml/rss/channel/item") )
#set ( $articles = $_XPathTool.selectNodes($contentRoot,"//item") )
#set($count = 0)
#if ($articles.size() > 3 )
#set ( $articles = $articles.subList(0,3))
#end
<div class="horizontalExcerpts">
<h2 class="redBoxIcon wrapper">Perspectives in Teaching &amp; Learning Blog <div class="icon"><i class="fa fa-rss">&#160;</i></div></h2>
<div class="row clearfix">
#foreach ( $article in $articles )
#set ( $title = $article.getChild("title").value )
#set ( $url = $article.getChild("link").value )
#set ( $date = $article.getChild("pubDate").value )
#set ( $desc = $article.getChild("description") )
## get Date object from date text
#set ( $dateObj = $_DateTool.toDate("EEE, d MMM yyyy HH:mm:ss Z",$date) )
#set ( $mth = ${_DateTool.format("MMM",$dateObj)})
#set ( $day = ${_DateTool.format("d",$dateObj)})
#set ($class = "col-1-3 last")
#if ($foreach.index != 2)
#set ($class = "col-1-3")
#end
<div class="${class}">
<div class="item">
<div class="date">
<div class="inner">
<div class="month">${mth}</div>
<div class="day">${day}</div>
</div>
</div>
<div class="content">
<p class="title"><strong>${_EscapeTool.xml($title)}</starong></p>
<!--#protect${desc.value}#protect-->
<p><a href="${url}">Continue Reading...</a></p>
</div>
</div>
</div>
#end
<div class="centerBtn">
<a href="http://blogs.wit.edu/lit/" class="greyBtn">See All Posts</a>
</div><!-- .btnContainer -->
</div><!-- .row -->
</div></code>
</pre>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/377008762015-08-19T20:31:05Z2015-08-19T20:31:05ZRss feed display<div><p>Ryan, Thanks. It works fine. Much appreciated.</p>
<p>Jim</p></div>steelej