Translations of this page:

News list

Using iframe

Example:

<script type="text/javascript">
	var smart_news_list = {}
	smart_news_list.name = 'test_obj';
	smart_news_list.width=600;
	smart_news_list.height=400;
	smart_news_list.scrolling = "auto";
	smart_news_list.columns = 'image,title,channel,owner,date,text';
	smart_news_list.text_character_count = 15;
	smart_news_list.template = "news/news_list.html";
	smart_news_list.channels = "1,2";
	smart_news_list.tags = "industry business internal";
	smart_news_list.link_new_window = '1';
	smart_news_list.page_size = 3;
	smart_news_list.css_main_table = "table_docs";
	smart_news_list.css_paging_table = "table_options";
	smart_news_list.show_paging = 1;
	smart_news_list.current_page = 1;
</script>
 
 
<script type="text/javascript"
  src="/intranet/news/show_smartnews.js">
</script>

Parameters description

1. name Defines object name which must be unique among several objects on the page and strongly recommended to be unique in the whole system, because variables of PHP session are distinguished on the basis of this name.

2. width The width of the frame counted in pixels.

3. height The height of the frame counted in pixels.

4. scrolling Frame scrolling. Possible values – auto, yes, no.

5. columns КColumns to be shown, comma separated list: image,title,channel,owner,date,text.

6. template You could define custom template for news list. By default it is “news/news_list.html”.

7. channels News Channels, comma separated list (”1,2”)

8. show_paging Defines if it’s needed to show the list of pages. The list of pages is shown only if you are using iframe. If iframe is not used, then a link to view all of the news is shown.

9. current_page defines page number, default is - 1.

10. link_new_window Opens links in new window. (1/0)

11. page_size Defines the number of the elements within one page. –1 – Show all elements.

12. CSS styles for documents list main table, page numbers table and trace path. css_main_table=”table_docs”; css_paging_table=”table_options”;

14. text_character_count The number of symbols to leave in text filed after cutting. 0 - do not constrain the size.

15. tags (available since 5.6) space separated tags to filter by. Only news with all selected tags will be displayed.

 
help/smart_objects/news_list.txt · Last modified: 07/06/2011 04:49 by admin
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki