pbCollections
Snippet for displaying tables.
Parameters
Parameter | Default | Description |
---|---|---|
id | Collection ID | |
modelType | modDocument | Document model |
classKey | pbTableValue | Table class |
context_key | current resource | By default, the current resource context is used. |
resource_id | current resource | By default, the ID of the current resource is used. |
tpl | Chunk for tables. | |
sortby | menuindex | Sort field |
sortdir | ASC | Sort order |
limit | 20 | Number of records displayed. 0 - means without limits. |
offset | 0 | Skipping values from the start |
fileElements | 0 | Use file chunks |
outputSeparator | \n | Output format of values. Possible values: data, json |
where | [] | Array of additional parameters for filtering results. |
return | chunk | Output format of values. Possible values: chunk, data or array, json |
Examples
Collection output
php
{'!pbCollections'|snippet: [
'id' => 1,
'tpl' => 'name_chunk'
]}
Outputting a collection from another resource
php
{'!pbCollections'|snippet: [
'id' => 1,
'resource_id' => 2,
'tpl' => 'name_chunk'
]}