SAPO::Widget.News->printNews

This method will render a box with NewsItems based on a JSON object converted from an RSS feed

Syntax

var news = new SAPO.Widget.News();
news.printNews(feed, [options]);

Input Parameters

  • (object) feed : JSON object coming from  http://services.sapo.pt/News/JSON?q=KEYWORDS&jsonTag=News
  • (object) options : Method options
    • (string) boxclass : Optional external CSS class definition for the widget. If not supplied, default CSS is applied.
    • (int) maxphotos : Optional maximum number of displayed photos (default is 10)
    • (bool) showsourceblog : Optional. Show a reference to the source Blog.
    • (bool) showdate : Optional. Shows the post date.
    • (int) width : Optional width of the box (default is 400)
    • (string) divid : Optional placeholder id. If not specified, will rendered inline with the method call.

Compatibility

All browsersYes

Depends

Sample

 http://js.sapo.pt/SAPO/Widget/Renderer/sample/news.html

Other methods from this Class

Error: Failed to load processor ListTagged
No macro or processor named 'ListTagged' found


Community feedback

Error: Failed to load processor AddComment
No macro or processor named 'AddComment' found