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 browsers | Yes |
Depends
- http://js.sapo.pt/SAPO/
- http://js.sapo.pt/SAPO/Exception
- http://js.sapo.pt/SAPO/Utility/String
- http://js.sapo.pt/SAPO/Utility/CSS
- http://js.sapo.pt/SAPO/Utility/Variable
- http://js.sapo.pt/SAPO/Widget/Parser
- http://js.sapo.pt/SAPO/Widget/News
Sample
http://js.sapo.pt/SAPO/Widget/Renderer/sample/news.html
Other methods from this Class
Community feedback