The <openbi:dblist> reads rows from a database table and replaces all values in a template. It supports static filters, filters from URL parameters and pagination.
Static filters can be set in the "data-filter" attribute and are merged with filters from URL parameters. By default, if a URL parameter name matches the name of a column of the table it will be used as a filter. E.g. "?COLUMN1=VALUE1" will automatically filter the result where "COLUMN1 = ‘VALUE1’". This behavior can be customized with the "data-url-filter-whitelist" attribute.
Attribute
data-table
Documentation
The name of a table in the database
Attribute
data-id-column
Documentation
The name of a column used for pagination count
Attribute
data-columns
Documentation
Semicolon separated list of columns which are read from the table.
Default: all columns are used
Attribute
data-filter
Documentation
Semicolon separated list of static filter values, which are used to filter the table. Example: COLUMN1=VALUE1;COLUMN2=VALUE2
Attribute
data-group-by
Documentation
Comma separated list of columns names to group by. Example: COLUMN1, COLUMN2
Attribute
data-order-by
Documentation
Comma separated list of columns to order the result. Example: COLUMN1 ASC, COLUMN2 DESC
Attribute
data-placeholder-prefix
Documentation
The prefix used for replacing placeholders. Default: ""
Attribute
data-sort-parameter
Documentation
The name of the URL parameter that is used for sorting.
Example: "sort" will allow for adding the following to the URL:
?sort=COLUMN1
If a URL parameter value is present, then "data-order-by" will be ignored!
Attribute
data-sort-direction-parameter
Documentation
The name of the URL parameter that is used for providing the sorting direction value: "ASC" or "DESC").
Example: "sortdir" will allow for adding the following to the URL: ?sort=COLUMN1?sortdir=DESC
Attribute
data-search-parameter
Documentation
The name of the URL parameter that is used for searching. The URL parameter value is splitted by a space (" ") and each part is searched with CONTAINS in every column combined with OR logic. Default: ""
Attribute
data-exactsearch-parameter
Documentation
The name of the URL parameter that is used for searching. The URL parameter value is searched with CONTAINS in every column combined with OR logic.
Default: ""
Attribute
data-items-per-page
Documentation
Number of rows per page. Can be left empty to return all
rows. Default: "10"
Attribute
data-items-per-page-parameter
Documentation
The name of the URL parameter to pass the number of rows per page.
Attribute
data-page-parameter
Documentation
The name of the URL parameter which is used for pagination.
Default: "page"
Attribute
data-disable-pagination
Documentation
If the value is set to "X" the automatic pagination item is not rendered
Attribute
data-disable-pagination-bottom
Documentation
If the value is set to "X" the bottom pagination is not rendered
Attribute
data-disable-pagination-top
Documentation
If the value is set to "X" the top pagination is not rendered
Attribute
data-placeholder-prefix
Documentation
The prefix used for replacing placeholders. Default: ""
Attribute
data-tpl-item
Documentation
The template used for each row.
Attribute
data-tpl-container
Documentation
The template used to wrap all "data-tpl-item" templates. It should contain a fixed table header (e.g. via <thead>) the text "%ITEMS%"
Attribute
data-tpl-empty
Documentation
The template used if no row was found.
Attribute
data-url-filter-whitelist
Documentation
Semicolon separated list of column names which should automatically be filtered with URL parameters. Leave empty to disable automatic URL parameter filters
Attribute
data-url-filter-whitelist
Documentation
Semicolon separated list of column names which should not automatically be filtered with URL parameters. Leave empty to disable automatic URL parameter filters
Attribute
data-read-multiple-tableattributes
Documentation
If set to "X" then also the "multiple" (1-N) table
attributes will be read and replaced as JSON arrays. Default: "X"
Example:
%PlaceholderPrefixColumnName_JSON%
Attribute
data-childproducts
Documentation
If the value is set to "X" then also the table attributes which reference other entities are replaced. Default: ""
Example:
%PlaceholderPrefixColumnName.ChildColumnName%"
Attribute
data-sub-page-path-filter
Documentation
Prerequisite: With Subpages must be active for the Role Content Element this HTML Item is contained in.
This way open bi automatically creates virtual subpages for this page that represent the page with a specific filter. In consequence, the URL path replaces the usage of passing the filter as a URL parameter, which will be optimized for search engines.
Example: Let's assume the name of the page is "list". Setting "CATEGORY;STATUS" for this parameter will make accessible e.g. the subpage:
/list/mycategory/mystatus
... which corresponds to:
/list?CATEGORY=mycategory&STATUS=mystatus
Action
(default AJAX action)
Documentation
Returns the rows of the table as JSON. The default placeholder
naming convention applies also here but without "%". Example:
[{
"COLUMN1": "VALUE1"
}, {
"COLUMN1": "VALUE2"
}]
In the "data-tpl-item" template, all column names of the referenced table can be used as placeholders.
Placeholder
Documentation
Placeholder
%ITEMS%
[data-tpl-container]
Documentation
Placeholder for all rows rendered based on "data-tpl-item"
Placeholder
%TOTAL_COUNT%
[data-tpl-container]
Documentation
Placeholder for the total item count
Placeholder
%PAGE%
[data-tpl-container]
Documentation
Placeholder for the current page index
Placeholder
%PAGECOUNT%
[data-tpl-container]
Documentation
Placeholder for the total