K4:Tag Cheat Sheet
From In-Portal Developers Guide
(Difference between revisions)
(New page: {{TipBox|Tag output parameters are passed to block, specified in "render_as" parameter.}}<br/> === IsNewMode === Tells, that form data wasn't saved to database yet. === PrintList, PrintL...) |
(design) |
||
Line 12: | Line 12: | ||
! name || values || description | ! name || values || description | ||
|- | |- | ||
- | | no_table | + | | {{ConfigProperty|no_table|bool}} |
| "1" or "0" | | "1" or "0" | ||
| Don't use HTML table for data output. Is enabled by default for "PrintList" tag. | | Don't use HTML table for data output. Is enabled by default for "PrintList" tag. | ||
|- | |- | ||
- | | list_name | + | | {{ConfigProperty|list_name|string}} |
- | | | + | | |
| Defines name, that will be used to keep list filter defined via "types" and "except" parameters. Can be used only for categories and category items. | | Defines name, that will be used to keep list filter defined via "types" and "except" parameters. Can be used only for categories and category items. | ||
|- | |- | ||
- | | requery | + | | {{ConfigProperty|requery|bool}} |
| "1" or "0" | | "1" or "0" | ||
| Discard previously retrieved from database data and retrieve it again. | | Discard previously retrieved from database data and retrieve it again. | ||
|- | |- | ||
- | | offset | + | | {{ConfigProperty|offset|int}} |
- | | | + | | |
| Start displaying data only starting from given zero-based record number. | | Start displaying data only starting from given zero-based record number. | ||
|- | |- | ||
- | | per_page | + | | {{ConfigProperty|per_page|int}}, {{ConfigProperty|max_items|int}} |
| any number or "-1" | | any number or "-1" | ||
| Display only given count of database records per page or pass "-1" to display all records. When missing and not set by user (via theme list "Items Per Page" control), then value from "default_per_page" is used. | | Display only given count of database records per page or pass "-1" to display all records. When missing and not set by user (via theme list "Items Per Page" control), then value from "default_per_page" is used. | ||
|- | |- | ||
- | | default_per_page | + | | {{ConfigProperty|default_per_page|int}} |
| any number or "-1" | | any number or "-1" | ||
| Used as default value for "per_page" parameter. When missing, then 10 items per page are displayed. | | Used as default value for "per_page" parameter. When missing, then 10 items per page are displayed. | ||
|- | |- | ||
- | | limit | + | | {{ConfigProperty|limit|int}} |
- | | | + | | |
| Allows to print less records, then are retrieved using "per_page"/"default_per_page" parameters. | | Allows to print less records, then are retrieved using "per_page"/"default_per_page" parameters. | ||
|- | |- | ||
- | | sort_by | + | | {{ConfigProperty|sort_by|string}} |
- | | string | + | | |
| Allows to define data sorting rules in format: "FieldName1,Order1|FieldName2,Order2". For example: "LastName,asc|BirthDate,desc". | | Allows to define data sorting rules in format: "FieldName1,Order1|FieldName2,Order2". For example: "LastName,asc|BirthDate,desc". | ||
|- | |- | ||
- | | types | + | | {{ConfigProperty|types|string}} |
- | | string | + | | |
| Comma separated types of data to display. | | Comma separated types of data to display. | ||
|- | |- | ||
- | | except | + | | {{ConfigProperty|except|string}} |
- | | string | + | | |
| Comma separated types of data to hide. | | Comma separated types of data to hide. | ||
|- | |- | ||
- | | direction | + | | {{ConfigProperty|direction|string}} |
| "H" or "V" | | "H" or "V" | ||
| Defines order, how data should be displayed in table (only, when "no_table" parameter is not used): | | Defines order, how data should be displayed in table (only, when "no_table" parameter is not used): | ||
Line 68: | Line 68: | ||
</pre> | </pre> | ||
|- | |- | ||
- | | columns | + | | {{ConfigProperty|columns|int}} |
- | | | + | | |
| Columns count used to display data. | | Columns count used to display data. | ||
|- | |- | ||
- | | render_as | + | | {{ConfigProperty|render_as|string}} |
- | | | + | | |
| Block name, that will be used to display one database table record. | | Block name, that will be used to display one database table record. | ||
|- | |- | ||
- | | row_start_render_as | + | | {{ConfigProperty|row_start_render_as|string}} |
- | | | + | | |
| Block name, that will be used to display row start ("<tr>" by default). | | Block name, that will be used to display row start ("<tr>" by default). | ||
|- | |- | ||
- | | row_end_render_as | + | | {{ConfigProperty|row_end_render_as|string}} |
- | | | + | | |
| Block name, that will be used to display row end ("</tr>" by default). | | Block name, that will be used to display row end ("</tr>" by default). | ||
|- | |- | ||
- | | empty_cell_render_as | + | | {{ConfigProperty|empty_cell_render_as|string}} |
- | | | + | | |
| Block name, that will be used to display empty cell ("<td> </td>" by default). | | Block name, that will be used to display empty cell ("<td> </td>" by default). | ||
|- | |- | ||
- | | more_link_render_as | + | | {{ConfigProperty|more_link_render_as|string}} |
- | | | + | | |
| Block name, that will be used to display "More ..." link, when there is more data in database, then is displayed to user. | | Block name, that will be used to display "More ..." link, when there is more data in database, then is displayed to user. | ||
|} | |} | ||
'''output parameters''' | '''output parameters''' | ||
- | + | {| class="wikitable" | |
- | + | |- | |
- | + | ! name || values || description | |
- | + | |- | |
- | + | | {{ConfigProperty|column_width|int}} | |
- | + | | | |
- | + | | Column width in percents, that is calculated based on "columns" parameter value. | |
- | + | |- | |
+ | | {{ConfigProperty|is_last|bool}} | ||
+ | | | ||
+ | | Allows to determine, that this is last displayed record. | ||
+ | |- | ||
+ | | {{ConfigProperty|not_last|bool}} | ||
+ | | | ||
+ | | Allows to determine, that this is not last selected from database record. | ||
+ | |- | ||
+ | | {{ConfigProperty|last_row|bool}} | ||
+ | | | ||
+ | | Allows to determine, that this is last row being displayed. | ||
+ | |- | ||
+ | | {{ConfigProperty|first_col|bool}} | ||
+ | | | ||
+ | | Allows to determine, that this is first column being displayed. | ||
+ | |- | ||
+ | | {{ConfigProperty|last_col|bool}} | ||
+ | | | ||
+ | | Allows to determine, that this is last column being displayed. | ||
+ | |- | ||
+ | | {{ConfigProperty|column_number|int}} | ||
+ | | | ||
+ | | Contains current printed column number. | ||
+ | |- | ||
+ | | {{ConfigProperty|num|int}} | ||
+ | | | ||
+ | | Contains current printed record index. | ||
+ | |} |
Revision as of 09:32, 21 April 2010
IsNewMode
Tells, that form data wasn't saved to database yet.
PrintList, PrintList2
Displays data from database table.
input parameters
name | values | description |
---|---|---|
no_table (bool)
| "1" or "0" | Don't use HTML table for data output. Is enabled by default for "PrintList" tag. |
list_name (string)
| Defines name, that will be used to keep list filter defined via "types" and "except" parameters. Can be used only for categories and category items. | |
requery (bool)
| "1" or "0" | Discard previously retrieved from database data and retrieve it again. |
offset (int)
| Start displaying data only starting from given zero-based record number. | |
per_page (int), max_items (int)
| any number or "-1" | Display only given count of database records per page or pass "-1" to display all records. When missing and not set by user (via theme list "Items Per Page" control), then value from "default_per_page" is used. |
default_per_page (int)
| any number or "-1" | Used as default value for "per_page" parameter. When missing, then 10 items per page are displayed. |
limit (int)
| Allows to print less records, then are retrieved using "per_page"/"default_per_page" parameters. | |
sort_by (string)
| FieldName2,Order2". For example: "LastName,asc|BirthDate,desc". | |
types (string)
| Comma separated types of data to display. | |
except (string)
| Comma separated types of data to hide. | |
direction (string)
| "H" or "V" | Defines order, how data should be displayed in table (only, when "no_table" parameter is not used):
A B C D E F K L M
A D K B E L C F M |
columns (int)
| Columns count used to display data. | |
render_as (string)
| Block name, that will be used to display one database table record. | |
row_start_render_as (string)
| Block name, that will be used to display row start ("<tr>" by default). | |
row_end_render_as (string)
| Block name, that will be used to display row end ("</tr>" by default). | |
empty_cell_render_as (string)
| Block name, that will be used to display empty cell ("<td> </td>" by default). | |
more_link_render_as (string)
| Block name, that will be used to display "More ..." link, when there is more data in database, then is displayed to user. |
output parameters
name | values | description |
---|---|---|
column_width (int)
| Column width in percents, that is calculated based on "columns" parameter value. | |
is_last (bool)
| Allows to determine, that this is last displayed record. | |
not_last (bool)
| Allows to determine, that this is not last selected from database record. | |
last_row (bool)
| Allows to determine, that this is last row being displayed. | |
first_col (bool)
| Allows to determine, that this is first column being displayed. | |
last_col (bool)
| Allows to determine, that this is last column being displayed. | |
column_number (int)
| Contains current printed column number. | |
num (int)
| Contains current printed record index. |