Navigation

1/13/2011

How to embed Blog posts into web pages?


Using  gfeedfetcher.js  from dynamic drive.  This takes RSS feed from a blog, and allows you to embed the content into a web page.


<script src="http://www.google.com/jsapi?key=Your-API-key" type="text/javascript">
</script>
<script src="http://your-server.com/gfeedfetcher.js" type="text/javascript">
</script>

<script type="text/javascript">
var cssfeed=new gfeedfetcher("example2", "test2class", "")
cssfeed.addFeed("CSS Drive", "URL of your ") //Specify "label" plus URL to RSS feed
cssfeed.displayoptions("description") //show the specified additional fields
cssfeed.setentrycontainer("p") //Display each entry as a list (li element)
cssfeed.filterfeed(5, "date") //Show 10 entries, sort by date
cssfeed.init() //Always call this last
</script>

No comments:

Post a Comment