Translations of this page:

News list

link_new_window attribute removed from this component in Claromentis version 5.6.5. It’s replaced by new string attribute link_target. Common values to set are “_self”, “_blank”, “_top”.

1. Parameters list

Here you can control how the list looks like - the number of columns, stylesheets, number of records (documents of folders) shown on a page, window size etc. All parameters have some default values and it’s necessary to specify only those that need to be customized.


<script type="text/javascript">
<script type="text/javascript"

2. Including JavaScript code

The following piece of code should not be edited or changed. It loads a fail containing JS-code which creates iframe object, loads it and places it inside of HTML container described in par.#1. This code could be placed in any part of the page, but obligatory after parameters list.

Using templater component

<component class="NewsSmartComponent"
tags="industry business"

Attribute \\class
defines PHP class, which forms html-code on the basis of parameters indicated. It’s not obligatory to indicate the full list of parameters, all parameters have default values defined in PHP-class.

<component class="NewsSmartComponent" name="component1" template = "news/news_list.html">

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”;

13. use_iframe Is used only for templater component. If set to 1, templater generates JS-code (given above), which creates iframe and loads documents list in it. If set to 0 - templater produces html-code of documents list framed by DIV.

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.

Related topics

components/built-in/news_list.txt · Last modified: 07/06/2011 10:49 by admin
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki