stephenjbell

Display Facebook RSS Feed in Velocity (dotCMS)

Jan 19th, 2012
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #pullRSSFeed("http://www.facebook.com/feeds/page.php?format=rss20&id=6420827863")
  2. #set($Q = '"')
  3. #foreach($content in $list)
  4.  
  5. ## Make Facebook's odd relative URLs into URLs that work from another site
  6. #set($content.description = $content.description.replaceAll("href=.\/","href=${Q}http://www.facebook.com/"))
  7. #set($content.link = $content.link.replaceAll("^\/","http://www.facebook.com/"))
  8.  
  9. <h3><a href="$!content.link">$!content.title</a></h3>
  10. <p>$!content.description</p>
  11. #end
Advertisement
Add Comment
Please, Sign In to add comment