In-Portal Developers Guide

This is a wiki-based Developers Guide for In-Portal Open Source CMS. The purpose of this guide is to provide advanced users, web developers and programmers with documentation on how to expand, customize and improve the functionality and the code the In-Portal software. Please consider contributing to our documentation writing effort.

K4:Tag Cheat Sheet

From In-Portal Developers Guide

Revision as of 09:32, 21 April 2010 by Alex (Talk | contribs)
Jump to: navigation, search
Image:Tipbox Icon.gif Tag output parameters are passed to block, specified in "render_as" parameter.

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):
  • "H" - horizontal layout
A B C
D E F
K L M
  • "V" - vertical layout
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>&nbsp</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.